worksheet Name and (Name) properties

M

Mikhail

There are two types of Name property of worksheet. For example, Sheet2
(DataSheet).
When I press F4 to see properties window, I have (name) Sheet2 and name
DataSheet.
In immediate window ? ActiveSheet.Name gives DataSheet.
How can I refer to (name) Sheet2. ? Activesheet.(Name) give error message.

Thanks, Mike510
 
J

Jan Karel Pieterse

Hi,

The (name) property is the codename of the sheet, the Name
property is the name you see on the Tab. If the Tab name
is "Tabname" and the codename is Sheet1:

Msgbox Worksheets("Tabname").Name

yields "Tabname"

and so does:

Msgbox Sheet1.Name

Regards,

Jan Karel Pieterse
Excel TA/MVP
 

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

Top