Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is Visual Basic the same as Visual Studio 2008? Mike Stewart Excel Worksheet Functions 5 January 11th 09 04:58 PM
Programmatic access to visual basic project via Visual FoxPro Jim Rech Excel Programming 0 January 11th 07 01:53 PM
Make visual basic truely visual! GraphicalGuy Excel Programming 0 October 20th 06 05:53 PM
Can I run Visual Basic procedure using Excel Visual Basic editor? john.jacobs71[_2_] Excel Programming 3 December 26th 05 02:22 PM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM


All times are GMT +1. The time now is 02:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"