LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Absolute Worksheet References

Hi there,

I read that (O'Reilly Excel Hacks, page 192) if you use "absolute"
Worksheet references that if the actual worksheet name changes that the
application will continue to work. This is true but I am using Excel
2003 and keep getting a reference not valid message, although the macro
still appears to work. Is there any way to fix this so that the
message does not appear?

To make myself clear:

Normally to reference a worksheet you can use:

1)
dim wks as Excel.Worksheet
set wks = ThisWorkbook.Worksheets("Sheet1")

OR

2)
dim wks as Excel.Worksheet
set wks = ThisWorkbook.Worksheets(1)

However, if you change Sheet1 to another name, (1) above breaks. If
you change the worksheet position within the workbook, (2) above
breaks.

However you are supposedly able to just reference a sheet by the name
given to it in the properties window. So looking in your Project
Explorer under Microsoft Excel Objects if you use the Codename of the
worksheet rather than the name you have given it (i.e. Sheet1, etc.)
you can reference the sheet directly without going through the above,
wiht the added benefit of it being (supposedly) impervious to worksheet
name changes... Except that it gives you this annoying Reference not
valid message.

Any help on getting the message to go away?

Regards,

Ric

 
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
convert relative cell references to absolute cell references via amacro? Dave F[_2_] Excel Discussion (Misc queries) 1 May 15th 08 04:43 PM
Help with converting a block of cells with Absolute and mixed references to relative references Vulcan Excel Worksheet Functions 3 December 13th 07 11:43 PM
Absolute References Dan Beard Excel Discussion (Misc queries) 3 October 16th 07 03:20 AM
Absolute References [email protected] Excel Worksheet Functions 1 November 29th 06 12:41 AM
Absolute references BWGames Excel Programming 1 December 31st 03 10:52 AM


All times are GMT +1. The time now is 11:44 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"