View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Per Jessen Per Jessen is offline
external usenet poster
 
Posts: 1,533
Default Refers to active cell not working

Hi

You only create a named list which refer to a specific sheet. A named range
can not refer to another workbook.

HTH
Per

"Miree" skrev i meddelelsen
...
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