Thread: Naming Ranges
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
PCLIVE PCLIVE is offline
external usenet poster
 
Posts: 1,311
Default Naming Ranges

I'm having trouble naming a range with this code.
B1 to D7 is selected.
r1 = 1
A1 = "950"
Why isn't this working?

ActiveWorkbook.Names.Add Name:=Range("A" & r1).Value,
RefersTo:=Selection.Address


Thanks.