I am trying to write a macro that adds a range name that refers to the
current selection rather than a specific cell address region.
The preceding code in my macro is currently
Selection.CurrentRegion.Select; and I then want to make the Range Name
refer to this selection.
From Chip Pearson's marvellous website, I know that if the currently
selected region had address $a$1:$C$10; the required code would have
ThisWorkbook.Names.Add Name:="NewName", RefersTo:="=$A$1:$C$10"
Can anyone help with the code that is required to make the NewName refer
to the currently selected region rather than a specific address ?
Thanks In Advance
Sent via Deja.com http://www.deja.com/
Before you buy.