View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
FinChase FinChase is offline
external usenet poster
 
Posts: 21
Default Insert named range problem

I want to be able to insert a named range using an A1 reference based on the
activecell using VBA. Based on Help, I tried the following code:

With ActiveWorkbook
.Names.Add Name:="Hold1", RefersTo:=RefersToLocal
End With
It does insert a name, but the range it refers to is #N/A. Is there a way
to do this so that it actually refers to the cell (for example, =B45)?