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

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  
Posted to microsoft.public.excel,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 59
Default accessing worksheets

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
what exactly prevents INDIRECT from accessing closed worksheets? z.entropic Excel Worksheet Functions 3 July 24th 07 03:02 PM
accessing worksheets greg Excel Worksheet Functions 2 November 2nd 04 03:53 PM
Question about accessing worksheets on an AddIn file 39N95W Excel Programming 1 May 25th 04 03:11 AM
programatically accessing Macros in worksheets Patrick[_8_] Excel Programming 1 April 15th 04 08:41 PM
Accessing the values of form controls on worksheets in Excel 2000 robbinma Excel Programming 2 August 28th 03 08:35 AM


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