View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Naming a range with VBA...

Dim sAddr as String
sAddr = ActiveCell.Address(1,1,xlR1C1)
ActiveWorkbook.Names.Add Name:="test", _
RefersToR1C1:="=Lister!R1C7:" & sAddr

--
Regards,
Tom Ogilvy

"Steff_DK " wrote in message
...
This won't work (either...)

sAddr dosn't get accepted as a cell address...


sAddr = ActiveCell.Address
ActiveWorkbook.Names.Add Name:="test",
RefersToR1C1:="=Lister!R1C7:sAddr"


---
Message posted from http://www.ExcelForum.com/