Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
nsv
 
Posts: n/a
Default Sheet properties Name and (Name)


When starting the Visual Basic editor three windows pop up: the editor,
a kind of "project explorer" and a sheet properties.

1) I am curious about this "sheet properties" window appearing with the
editor. What is the purpose in a VBA programming situation?
2) Two of the sheet properties are 'Name' and '(Name)' and both are by
default designated 'Sheet1'. Apart from the fact that you can change
'Name' by clicking the tab of the sheet, what is the difference between
the two properties?
3) I have a workbook where I need an easy reference to each sheet, but
they are all given an explanatory 'Name' that is both long and
complicated and cannot be changed, so I hope to be able to use the
other. Is it possible in formulas or VBA to refer to '(Name)' in stead
of 'Name'?


NSV


--
nsv
------------------------------------------------------------------------
nsv's Profile: http://www.excelforum.com/member.php...o&userid=26500
View this thread: http://www.excelforum.com/showthread...hreadid=504380

  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Sheet properties Name and (Name)


"nsv" wrote in message
...

When starting the Visual Basic editor three windows pop up: the editor,
a kind of "project explorer" and a sheet properties.

1) I am curious about this "sheet properties" window appearing with the
editor. What is the purpose in a VBA programming situation?


You can change the properties there, such as the name, the visible property.

2) Two of the sheet properties are 'Name' and '(Name)' and both are by
default designated 'Sheet1'. Apart from the fact that you can change
'Name' by clicking the tab of the sheet, what is the difference between
the two properties?


Name is the value that you see in Excel, and can be changed here. (Name) is
what is called the CodeName and cannot be changed from Excel. Because of
this, worksheets are often addressed in VBA code by the codename, as you
know the user will not change that whereas they might change the Name of the
worksheet.

3) I have a workbook where I need an easy reference to each sheet, but
they are all given an explanatory 'Name' that is both long and
complicated and cannot be changed, so I hope to be able to use the
other. Is it possible in formulas or VBA to refer to '(Name)' in stead
of 'Name'?


As explained above yes. Instead of

Worksheets("Sheet1").Select

you use

Sheet1.Seelect

It is also good practice to give a meaningful codename to your worksheets,
such as Master, Totals, or whatever. I also precede the codename with 'ws'
as a quickly identifiable handle.


  #3   Report Post  
Posted to microsoft.public.excel.misc
nsv
 
Posts: n/a
Default Sheet properties Name and (Name)


Thanks a lot - all seems logical and it is surely very useful.

NSV


--
nsv
------------------------------------------------------------------------
nsv's Profile: http://www.excelforum.com/member.php...o&userid=26500
View this thread: http://www.excelforum.com/showthread...hreadid=504380

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



All times are GMT +1. The time now is 06:32 PM.

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"