• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Mass update of macros

Shazz

Member
Hi All,

I have a spreadsheet where I have a lot of Macros set up, my problem is when I delete a line all the macros get mucked up and refer to other lines.

Is there a way at all that they can all be updated in one or a way to make it so when a line is deleted the macros stay in Sync??

Any help would be soo appreciated.

Shazz
x
 
Don't hard code ranges or offsets etc
Use variables that are derived from fixed or known points on the worksheet

eg:

Instead of Range("A1:A5")
use Range("A1:A"& var)
where var is calculated

etc
 

Hi !

See also CurrentRegion, End and UsedRange properties …
Cells range can be also named.
 
Hui,

in my spread sheet I have a button that when pressed will fill data in certain cells on a row, I have named each macro with the persons name.

Are you able to give me an example of what I need to do?

Shazz
 
Why not share a macro that is causing an issue when rows are added or deleted
then we can change it for you and you will learn by seeing what is done

Otherwise we are guessing and don't know what your exact issue is
 
Hi,

Attached is a example, I have taken out all private info, but if you click the little blue Triangles you will see they work up to a point and then they go out of sync because a line has been deleted.

I hope you understand what my problem is.

Shazz
x
 

Attachments

Back
Top