Visual Basic 6.5 in Excel
The usual way is to define a Named range in the worksheet and use that Name
in the VBA code. As you insert/remove rows/columns, the Name will adjust.
--
Gary''s Student - gsnu200770
"mrogge2895" wrote:
When modiifying a macro recorded in excel, is there a way to program the code
to automatically recognize changes made within sheets used within the macro?
For example, if I record a macro, and later, I add a row above or below a
cell used within the macro, is there a way to force the macro to understand
the change in the cell reference as a result of adding the row? Currently,
whenever I write a macro, and subsequently add rows, the macro will not
execute due to the movement of the cell references from their original
location. I am trying to find out if this can be fixed in the programming.
Thanks.
|