Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
greg
 
Posts: n/a
Default accessing worksheets

Hello,

I have a question about referencing a specific sheet.

I see you can do this:

ThisWorkbook.Worksheets("MySpecialSheet").Select

Or

ThisWorkbook.Worksheets(2).Select

However, if the user changes the name of the sheet to "MySpecialSheet2" or
re-order the tabs you cannot use those.

I see there is a property CodeName. Which always has the default "Sheet<x"
name.

Can this be used?

Is there some other way to identify the sheet?



Thanks




  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Yes you can use CodeName

Sheet2.Select

--

HTH

RP
(remove nothere from the email address if mailing direct)


"greg" wrote in message
...
Hello,

I have a question about referencing a specific sheet.

I see you can do this:

ThisWorkbook.Worksheets("MySpecialSheet").Select

Or

ThisWorkbook.Worksheets(2).Select

However, if the user changes the name of the sheet to "MySpecialSheet2" or
re-order the tabs you cannot use those.

I see there is a property CodeName. Which always has the default

"Sheet<x"
name.

Can this be used?

Is there some other way to identify the sheet?



Thanks






  #3   Report Post  
greg
 
Posts: n/a
Default

thanks for the help


"Bob Phillips" wrote in message
...
Yes you can use CodeName

Sheet2.Select

--

HTH

RP
(remove nothere from the email address if mailing direct)


"greg" wrote in message
...
Hello,

I have a question about referencing a specific sheet.

I see you can do this:

ThisWorkbook.Worksheets("MySpecialSheet").Select

Or

ThisWorkbook.Worksheets(2).Select

However, if the user changes the name of the sheet to "MySpecialSheet2"

or
re-order the tabs you cannot use those.

I see there is a property CodeName. Which always has the default

"Sheet<x"
name.

Can this be used?

Is there some other way to identify the sheet?



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
duplicating worksheets Ralph2 Excel Discussion (Misc queries) 1 January 20th 05 06:05 AM
Number of worksheets Mark Excel Discussion (Misc queries) 1 January 18th 05 11:05 AM
HELP! How do you--> Lock a set of rows but also link worksheets to FRUSTRATED Excel Discussion (Misc queries) 6 December 29th 04 11:05 PM
data entry on multiple worksheets diosdias Excel Discussion (Misc queries) 1 December 7th 04 06:33 PM
Assigning Cells in worksheets to other data in other worksheets. David McRitchie Excel Discussion (Misc queries) 0 November 27th 04 07:15 PM


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