Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I turn on relative reference(?) in a macro (97ver had butto
In the 97 version of Excel you could click the relative reference button (I
think that is what it was called) and the macro would recognize and update itself automatically if the spreadsheet itself changed after the macro was created. (i.e. vb programming says select cell B2 and clear the contents, you insert a row above row B, so B2 is now B3 but your macro still wants to clear B2.) How do you do this in Excel 2003? Thanks. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do I turn on relative reference(?) in a macro (97ver had butto
There is no way to reference as you describe. The code will have no idea that
at some point prior to exectution that the sheet was changed (row inserted). Right on the Macro record toolbar there is a button for relative referencing but that will not do what you have described here. The way to do that would be to make Cell B2 a named range. Then when you record the macro it will reference the named range which will move as you insert rows or such thereby keeping your macro working as intended. -- HTH... Jim Thomlinson "Bernina27" wrote: In the 97 version of Excel you could click the relative reference button (I think that is what it was called) and the macro would recognize and update itself automatically if the spreadsheet itself changed after the macro was created. (i.e. vb programming says select cell B2 and clear the contents, you insert a row above row B, so B2 is now B3 but your macro still wants to clear B2.) How do you do this in Excel 2003? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Relative reference? in macro | Excel Worksheet Functions | |||
Using relative reference in macro | Excel Discussion (Misc queries) | |||
Relative reference in macro | Excel Programming | |||
Relative Reference in a Macro | Excel Programming | |||
MACRO Relative Reference | Excel Programming |