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 variable range

Why not use the easy method you were previously given:

Range("A" & UniqueDataStart & ":" & "A" & DataLast).Select

Selection.Name = "S1"

--
Regards,
Tom Ogilvy


"Nigel" wrote in message
oups.com...
why isnt this working?

Range("A" & UniqueDataStart & ":" & "A" & DataLast).Select
ActiveWorkbook.Names.Add Name:="S1", RefersTo:=Selection

i just want to named that range S1