View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
PerlDev PerlDev is offline
external usenet poster
 
Posts: 7
Default Why can't name the range?

There was a typo

'now name it, bur has run-time error '1004', the name is not valid

ActiveSheet.Names.add Name:= v, RefersToR1C1="""=" & ActiveSheet.Name
& "!" & v & """", Visible:=True



with ActiveSheet
.Names.add Name:=v, RefersToR1C1="""=" & .Name & "!" &
rng.AddressLocal & """", Visible=True
end with