Selecting a sheet by code name

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can anyone please supply me with the syntax for selecting a sheet by the code
name - NOT by name: sheets("MySheet").select

Thanks
The Doctor
 
Sheet1.Select

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2000 & 2003
** remove news from my email address to reply by email **
 
In your project explorer you see the names of sheets listed like:
Sheet1 (Sheet1)
Sheet2 (Sheet2)
etc.

If you change the tab names it becomes:
Sheet1 (My Sheet)
Sheet2 (His Sheet)
etc.

In the second example, to refer to Sheets("My Sheet") by code name you
simply use:
Sheet1

For example:
Sheet1.Select

The code names can be chanced from the Properties window. Open the
properties window and click on the sheet you want to rename in the
project explorer. You'll then see the code name at the top of the
properties window where it can be edited. - pikus
 

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