Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default Refers to active cell not working

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)

"Per Jessen" wrote:

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Refers to active cells Miree Excel Programming 7 October 2nd 08 01:36 PM
macro than refers to a cell? jackrobyn1 Excel Discussion (Misc queries) 1 June 18th 08 11:01 PM
API to find position of active cell no longer working in 2007. GollyJer Excel Programming 5 June 13th 07 09:29 PM
Cell has a value of #N/A when the formula refers to nothing Man Utd Excel Programming 6 June 16th 05 09:33 PM
Macro execution refers not to the active sheet/excel file blop Excel Programming 1 October 29th 03 01:17 PM


All times are GMT +1. The time now is 02:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"