Hi Brian
What I'd like is to get a Name object for which all properties and
methods work like they're supposed to, and not have to worry about which
sheet I'm on, or which sheet comes first, etc.
Darn it. I thought my macro did this for me, but I just used it to
delete a book level name object and it deleted one of the sheet level
objects instead (in this case the one on the activesheet).
Well, I've been running myself ragged on this. I think now I see that
Jan Karel summed it up pretty well, except the detail regarding
sheets(1) containing a sheet level name.
That is right, to exactly reference and use a global name, you MUST
have an activesheet that does NOT contain an identically named sheet
name. The fastest VBA method to ensure you get it right is to
temporarily insert an empty worksheet. If you need to change either
the visible property or the refersto property, you need to do the
above to make sure you stay away from local names on the active sheet.
Even fully qualifying the name by preceding it with the workbook's
name will not help.
BTW:
I have been working on enabling editing of names which refersto string
is more than 240 characters. It seems to work (but only for direct
range references, not for formulas, which is impossible). One can now
reliably edit a rangename that refers to (e.g.) 231 areas! Find the
beta he
http://www.jkp-ads.com/NameManager31Beta.zip
Regards,
Jan Karel Pieterse
Excel MVP
www.jkp-ads.com