Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Worksheets Names

Is there a way to define a worksheet level name through the user interface
or does it have to be done through code or copying a sheet containing a
workbook level name?

PWS


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Worksheets Names


in the name dropdownbox or in Define names

simply precede the name with the
worksheetname and an exclamation mark.

sheet1!Myname

be aware that you must avoid having
the same name at workbook AND worksheet level.

download NameManager addin from www.jkp-ads.com
a must have for developers (and many users :)



--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Paul Smith wrote :

Is there a way to define a worksheet level name through the user
interface or does it have to be done through code or copying a sheet
containing a workbook level name?

PWS

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Worksheets Names

ps:
for worksheet names with spaces etc you must add apostrophes
'my sheet'!my_name

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


keepITcool wrote :


in the name dropdownbox or in Define names

simply precede the name with the
worksheetname and an exclamation mark.

sheet1!Myname

be aware that you must avoid having
the same name at workbook AND worksheet level.

download NameManager addin from www.jkp-ads.com
a must have for developers (and many users :)

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Worksheets Names



"keepITcool" wrote in message
. com...

be aware that you must avoid having
the same name at workbook AND worksheet level.


Why? It can be useful. Of course, it c an be abused, but so can anything.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Worksheets Names


I said: avoid... it wasnt a definite nono.

A. it can be VERY confusing for "name" newbies.

B. you cannot access (thru VBA or functions)
a global name IF the same (local) name exists
on the activesheet.

I remember an essay from JK Pieterse on following:

C. calculation initiated from VBA may end up with
unexpected results for "named formulas".
depending on activesheet at time time the calculation
was run.

sorry, cant find the link..


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Bob Phillips wrote :



"keepITcool" wrote in message
. com...

be aware that you must avoid having
the same name at workbook AND worksheet level.


Why? It can be useful. Of course, it c an be abused, but so can
anything.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Worksheets Names


"keepITcool" wrote in message
.com...

I said: avoid... it wasnt a definite nono.


.... be aware that you must avoid having the same name at workbook AND
worksheet level...

sounds like a pretty definite nono to me.

A. it can be VERY confusing for "name" newbies.


That is true of many things, which doesn't mean others shouldn't.

B. you cannot access (thru VBA or functions)
a global name IF the same (local) name exists
on the activesheet.


You can, it is more work but it can be done. But why would you want to, that
would defeat the purpose of having a same name local name.

I remember an essay from JK Pieterse on following:

C. calculation initiated from VBA may end up with
unexpected results for "named formulas".
depending on activesheet at time time the calculation
was run.

sorry, cant find the link..


That is a shame, I would like to have read that.


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Worksheets Names


Bob Phillips wrote :


sounds like a pretty definite nono to me.


..hmm :)


A. it can be VERY confusing for "name" newbies.


That is true of many things, which doesn't mean others shouldn't.


OP is a newbie.

B. you cannot access (thru VBA or functions)
a global name IF the same (local) name exists
on the activesheet.


You can, it is more work but it can be done. But why would you want
to, that would defeat the purpose of having a same name local name.


this is definitely defeating the purpose, but a nice exercise..

but HOW do you want to delete the global name
(or change it's refersto..)

Sub foo()
Dim wks
Names.Add "MyName", "remove me"
For Each wks In Worksheets
wks.Names.Add "MyName", "obsure the global"
Next

End Sub

answer in ROT13:
V oryvrir nqqvat n oynax furrg vf gur bayl jnl.


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Worksheets Names

Hi Bob,

B. you cannot access (thru VBA or functions)
a global name IF the same (local) name exists
on the activesheet.


You can, it is more work but it can be done.


AFAIK the only way would be first to activate another sheet. But I would be
interested if you know of way without doing that.

Regards,
Peter T


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Worksheets Names



the only other (error prone) alternative
to adding a blank sheet is:

create a copy of the "blocking" name
delete the blocking name
delete the global name
recreate the blocking name
delete the copy..


it's error prone as the refersto may be too long
for the names.add method (complex formulas or multiarea's.)


--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Peter T wrote :

Hi Bob,

B. you cannot access (thru VBA or functions)
a global name IF the same (local) name exists
on the activesheet.


You can, it is more work but it can be done.


AFAIK the only way would be first to activate another sheet. But I
would be interested if you know of way without doing that.

Regards,
Peter T

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
names in different worksheets a m spock Excel Worksheet Functions 2 January 6th 09 07:34 AM
Names and Separate Worksheets Memento Excel Worksheet Functions 4 May 9th 07 01:20 AM
Listing the names of your worksheets gunslinger Excel Discussion (Misc queries) 3 May 30th 06 11:12 PM
Compare names in two different worksheets excelnewbie Excel Programming 2 September 15th 03 08:59 PM
Names of worksheets Mac[_4_] Excel Programming 1 September 1st 03 07:18 AM


All times are GMT +1. The time now is 04:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"