View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Miree Miree is offline
external usenet poster
 
Posts: 90
Default Refers to active cell not working

I had this code

ActiveWorkbook.Names.Add Name:="OBM", RefersToR1C1:="=Densities!R4C6:R139C6"

But needed it to refer to the active cells for that i did

ActiveWorkbook.Names.Add Name:="OBM", RefersToR1C1:=Selection.Address

Which seemed to work fine

BUT it only names the cell range, and not the work book so i cant use the
defined range anywhere else

I have tried

MyList = Selection.Address
ActiveWorkbook.Names.Add Name:="OBM", RefersTo:="=Densities!" & MyList

but this still only uses the cell range and not the work book


Please Help me
Thanks