Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Visual Basic 6.5 in Excel
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Visual Basic 6.5 in Excel
I see. I will give that a try, and see if it works. Thank you.
"Gary''s Student" wrote: 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is Visual Basic the same as Visual Studio 2008? | Excel Worksheet Functions | |||
Programmatic access to visual basic project via Visual FoxPro | Excel Programming | |||
Make visual basic truely visual! | Excel Programming | |||
Can I run Visual Basic procedure using Excel Visual Basic editor? | Excel Programming | |||
changing the visual basic in office 2003 to visual studio net | Excel Discussion (Misc queries) |