Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default What is the real name?

G'day there One & All,

I just have a quick question to try to clarify how something
works. My WorkBook contains 8 WorkSheets. Oddly enough, the Project
Browser shows a tree of 8 WorkSheets named: Sheet1(Main); Sheet2
(Roster); Sheet3(Staff); etc.

The Properties Window indicates that each sheet has a "(Name)",
eg. "Sheet6", and a "Name", eg. "Equity". I know that they don't refer
to the same thing, but what is the difference between the 2?

I have previously used the "(Name)" to refer to each sheet by
changing its value. Eg. Sheet1(Main) became "mSht". This allowed me to
use such constructs as "mSht.Range("Groups").clearcontents". However in
some circumstances, which I never understood & so can't really explain,
this didn't work & I had to also "Dim mSht as WorkSheet" and then "Set
mSht = WorkSheets("Main")". Why is this?

Can someone either explain, or point me to a web based description
of what & why? My current code had a bit of difficulty referring to one
of the sheets so I changed them all back to the "Sheet1(Main)" format
and Dimmed and Set all over the place to compensate. I can't see what
the problem was and I found it easier to refer to sheets as "mSht".

Is it that the (Name) represents the WorkSheet object for the
particular sheet, while Name is just a property? That's the only
scenario I could think of, but I still don't quite grasp the possible
ramifications.

Thanks for listening,
--
Ken McLennan
Qld, Australia
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default What is the real name?

(name) is the code name.

See Excel VBA help on codename.

See Chip Pearson's page on this as well:
http://www.cpearson.com/excel/codemods.htm

--
Regards,
Tom Ogilvy


"Ken McLennan" wrote in message
.. .
G'day there One & All,

I just have a quick question to try to clarify how something
works. My WorkBook contains 8 WorkSheets. Oddly enough, the Project
Browser shows a tree of 8 WorkSheets named: Sheet1(Main); Sheet2
(Roster); Sheet3(Staff); etc.

The Properties Window indicates that each sheet has a "(Name)",
eg. "Sheet6", and a "Name", eg. "Equity". I know that they don't refer
to the same thing, but what is the difference between the 2?

I have previously used the "(Name)" to refer to each sheet by
changing its value. Eg. Sheet1(Main) became "mSht". This allowed me to
use such constructs as "mSht.Range("Groups").clearcontents". However in
some circumstances, which I never understood & so can't really explain,
this didn't work & I had to also "Dim mSht as WorkSheet" and then "Set
mSht = WorkSheets("Main")". Why is this?

Can someone either explain, or point me to a web based description
of what & why? My current code had a bit of difficulty referring to one
of the sheets so I changed them all back to the "Sheet1(Main)" format
and Dimmed and Set all over the place to compensate. I can't see what
the problem was and I found it easier to refer to sheets as "mSht".

Is it that the (Name) represents the WorkSheet object for the
particular sheet, while Name is just a property? That's the only
scenario I could think of, but I still don't quite grasp the possible
ramifications.

Thanks for listening,
--
Ken McLennan
Qld, Australia



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default What is the real name?

G'day there Tom,

(name) is the code name.

See Excel VBA help on codename.

See Chip Pearson's page on this as well:
http://www.cpearson.com/excel/codemods.htm


Thanks very much for that information. I've had a quick peruse of
Chip's page, but didn't understand it all that well. Hence I've
downloaded it for printing today. (I'll get the hang of this Excel thing
yet!!). I've not looked at the Help file yet, but that too is on my
agenda.

Thank you for your very prompt assistance. I really do appreciate
it. I know that I'd not have gotten very far without the willingness of
you & your fellow professionals to help on this forum. Which leads to
the question: Where on earth do find the time to fit it in?!! <g My
wife complains when I spend an hour or two at the computer!

Thanks again,
See ya,
--
Ken McLennan
Qld, Australia
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default What is the real name?


Hi Ken,
Some additional info for you.

http://vbaexpress.com/forum/showthre...hlight=piranha

Dave
Ken McLennan Wrote:
G'day there One & All,

I just have a quick question to try to clarify how something
works. My WorkBook contains 8 WorkSheets. Oddly enough, the Project
Browser shows a tree of 8 WorkSheets named: Sheet1(Main); Sheet2
(Roster); Sheet3(Staff); etc.

The Properties Window indicates that each sheet has a "(Name)",
eg. "Sheet6", and a "Name", eg. "Equity". I know that they don't refer
to the same thing, but what is the difference between the 2?

I have previously used the "(Name)" to refer to each sheet by
changing its value. Eg. Sheet1(Main) became "mSht". This allowed me to
use such constructs as "mSht.Range("Groups").clearcontents". Howeve
in
some circumstances, which I never understood & so can't reall
explain,
this didn't work & I had to also "Dim mSht as WorkSheet" and then "Set
mSht = WorkSheets("Main")". Why is this?

Can someone either explain, or point me to a web based description
of what & why? My current code had a bit of difficulty referring t
one
of the sheets so I changed them all back to the "Sheet1(Main)" format
and Dimmed and Set all over the place to compensate. I can't see what
the problem was and I found it easier to refer to sheets as "mSht".

Is it that the (Name) represents the WorkSheet object for the
particular sheet, while Name is just a property? That's the only
scenario I could think of, but I still don't quite grasp the possible
ramifications.

Thanks for listening,
--
Ken McLennan
Qld, Australi


--
Piranh
-----------------------------------------------------------------------
Piranha's Profile: http://www.excelforum.com/member.php...fo&userid=2043
View this thread: http://www.excelforum.com/showthread.php?threadid=47336

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
Is this for real? Johnny[_4_] Excel Worksheet Functions 1 August 29th 09 10:56 PM
Real teaser! LiAD Excel Worksheet Functions 4 August 27th 09 08:36 AM
This may be real simple, but... Cerberus Excel Discussion (Misc queries) 6 March 18th 08 08:01 PM
A real puzzle? paulsuk Excel Discussion (Misc queries) 7 March 7th 07 07:27 PM
real number kontraa Excel Discussion (Misc queries) 4 April 3rd 06 12:48 PM


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