D
DocBrown
If I code a macro with an address, say "H10" or "$H$10" or any of the other
methods of referencing cells, from testing I've done it appears that if you
add rows or columns to the worksheets, these references are not updated like
they are in formulas.
Is this correct? If not, what are the coding methods to use to make the
macros access the correct cells. For example If I have a Macro that works on
cells in both column "F" and "H" and I add columns either before F or
inbetween F and H, the macros will now operate on the incorrect columns.
In these cases, I'm no sure if offsets will work eitherif adding columns
between the referenced columns.
The only way that I've found to prevent this is to always use named ranges.
Are there other ways? I'm looking at this in terms if I happen to want to
modify the worksheet in the future to add new functionallity. I'd like to be
able to make the worksheet mods without the worry that I'll break the macros.
Thanks,
John
methods of referencing cells, from testing I've done it appears that if you
add rows or columns to the worksheets, these references are not updated like
they are in formulas.
Is this correct? If not, what are the coding methods to use to make the
macros access the correct cells. For example If I have a Macro that works on
cells in both column "F" and "H" and I add columns either before F or
inbetween F and H, the macros will now operate on the incorrect columns.
In these cases, I'm no sure if offsets will work eitherif adding columns
between the referenced columns.
The only way that I've found to prevent this is to always use named ranges.
Are there other ways? I'm looking at this in terms if I happen to want to
modify the worksheet in the future to add new functionallity. I'd like to be
able to make the worksheet mods without the worry that I'll break the macros.
Thanks,
John