Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
When I insert a row after I have recorded a macro, the macro stops referring to the correct cells. To fix this, I tried naming all the cells variables and having the macro refer to the variable names instead of the cell location (ie. A1). So instead of: Range("A1").Select Selection.Copy I tried: Range("pop1d").Select Selection.Copy but I get an error message that says "select method of range class failed". What is the correct way to refer to variable names in visual basic? Also, is there any other way to have visual basic auto-update and refer to the correct cells if I were to insert a row after recording the macro? Thanks, Adam |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using formulas to select cells (Ex: Select every nth cell in a col | Excel Discussion (Misc queries) | |||
Use a Variable to select a range | Excel Discussion (Misc queries) | |||
Select one variable from a list of variables by clicking one cell | Excel Discussion (Misc queries) | |||
Excel 2003: In a Macro,how to select a variable row length table | Excel Discussion (Misc queries) | |||
Range("C9:V9").Select ==> changing the 9 to a variable | Excel Worksheet Functions |