Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default 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
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
Relative reference? in macro TRYING Excel Worksheet Functions 3 November 20th 07 12:00 AM
Using relative reference in macro Bas Excel Discussion (Misc queries) 0 March 23rd 06 12:11 PM
Relative reference in macro Ricki Miles Excel Programming 3 January 23rd 05 08:51 PM
Relative Reference in a Macro DRH Excel Programming 2 December 31st 04 02:20 PM
MACRO Relative Reference Ibrahim Awwad Excel Programming 3 September 9th 03 02:11 PM


All times are GMT +1. The time now is 03:17 AM.

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"