Refers to active cell not working

M

Miree

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
 
P

Per Jessen

Hi

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

HTH
Per
 
M

Miree

I have a work book that works on one sheet i have all of the list data
On another sheet where i need the data, the cells have the validation
=INDIRECT($F$8) which refers to the list names. It works in the book i have.

Sorry my english was wrong in my initial question ment to say
it only references the cell range not the worksheet.(not work book)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top