RangeName blocks of data
I guess because I didn't feel that address is all that is necessary.
--
Regards,
Tom Ogilvy
"GS" wrote in message
...
Hi Tom,
Prior to my original post, there were no others. There seems to be a time
delay for updating the forum. (I think we've seen this before) Had I seen
your post, I wouldn't have bothered as it's good "as is".<FWIW
The switch to using local names was an afterthought in case there were
other
sheets in the wbk that could possibly end up replacing global name
references.
(If I may...) -question regarding your interesting alternative to making
the
local names; why the (-1, -1, xlA1, True) when .Address is all that's
necessary? <-Just curious!<g
Regards,
Garry
"Tom Ogilvy" wrote:
You can also make a local name (sheet level) with
Activesheet.Names.Add Name:=CurrentBlock.Value, _
Refersto:="=" & RangeToName.Address(-1,-1,xlA1,True)
for Workbook Level
ActiveWorkbook.Names.Add Name:=CurrentBlock.Value, _
Refersto:="=" & RangeToName.Address(-1,-1,xlA1,True)
--
Regards,
Tom Ogilvy
"GS" wrote in message
...
To assign a local name (sheet level), replace this line:
RangeToName.Name = CurrentBlock.Value
with this one:
RangeToName.Name = "'" & ActiveSheet.Name & "'!" &
CurrentBlock.Value
Regards,
GS
|