Worksheet level names
On Apr 11, 7:56*pm, GS wrote:
To define a name with local scope it must include the sheetname
(wrapped in single quotes followed by the exclamation character) in its
definition. You can programmatically assign local names as follows:
* Range("$A$1").CurrentRegion.Name = "'" _
* * * * * * * * & ActiveSheet.Name & "'!" & sRngName
So if the sheet was named "Charting" and the value held in sRngName is
"Sales" then the above would read...
* Range("$A$1").CurrentRegion.Name = "'Charting'!Sales"
..which is how you would define it in the Namebox or name field in the
Defined Names dialog if you manually selected the area and typed the
name.
--
Garry
Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc
Hi Garry,
thank you very much for your professional help. Regards, Andreas
How come that I am not able anymore to rate the answers. I cannot find
any rating system. Strange, isn't it?
|