accessing worksheets

  • Thread starter Thread starter greg
  • Start date Start date
G

greg

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
 
Yes you can use CodeName

Sheet2.Select

--

HTH

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


Bob Phillips said:
Yes you can use CodeName

Sheet2.Select

--

HTH

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top