LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 95
Default How to reference Worksheets in VBA properly

Hi experts in the community,

as VBA newbie I know there are two possibilities to reference a
worksheet in an application:

Example: ... Worksheets(workSheetID).Range("openIcon").Value ...

where workSheetID is either:

a.) a numerical ID, the sheet index
or
b.) a string, the name of the sheet as it is displayed in the sheet
tabs.

Question: how can I reference the sheet in VBA without being
intertwined by either sheet name changes or insertions of new sheets
by the user?

Thanks for your help
Have a nice day
Michael
 
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
Cleaning up Excel 97-2003 worksheets to work properly in Office 20 Santiago C Excel Discussion (Misc queries) 0 December 27th 08 11:21 AM
Cleanup worksheets from 97-2003 to work properly on Excel 2007 Santiago C Excel Worksheet Functions 0 December 8th 08 05:43 PM
Reference different worksheets WLMPilot Excel Discussion (Misc queries) 2 December 27th 07 03:42 PM
3d reference not working properly Bren Lane Excel Worksheet Functions 1 March 28th 07 10:15 PM
Worksheets Don't Properly Send When Emailing Erin Excel Discussion (Misc queries) 0 September 28th 06 05:16 PM


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

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

About Us

"It's about Microsoft Excel"