Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Referencing a named range in another workbook

Simple one - I think!

My main application (Excel Workbook) opens another workbook with named
range(single cell). How can I refer to these named ranges and return the
value.
In the following code I am trying to set the sheet shControl (codename)
range A1 to the value in the dataWb named range "OptRef"

Dim dataWb as Workbook
Set dataWb = Workbooks.Open(myfile)
With dataWb.Sheets("Sheet1")
shcontrol.range("A1") = ????
End With

TIA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Referencing a named range in another workbook

shcontrol.range("A1").Value = .Range("OptRef").Value
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Nigel RS"
wrote in message
Simple one - I think!

My main application (Excel Workbook) opens another workbook with named
range(single cell). How can I refer to these named ranges and return the
value.
In the following code I am trying to set the sheet shControl (codename)
range A1 to the value in the dataWb named range "OptRef"

Dim dataWb as Workbook
Set dataWb = Workbooks.Open(myfile)
With dataWb.Sheets("Sheet1")
shcontrol.range("A1") = ????
End With

TIA
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 735
Default Referencing a named range in another workbook

Thanks Jim, I got tangled up in using the workbook Names collection and lost
sight of the Range !

--

Regards,
Nigel




"Jim Cone" wrote in message
...
shcontrol.range("A1").Value = .Range("OptRef").Value
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



"Nigel RS"
wrote in message
Simple one - I think!

My main application (Excel Workbook) opens another workbook with named
range(single cell). How can I refer to these named ranges and return the
value.
In the following code I am trying to set the sheet shControl (codename)
range A1 to the value in the dataWb named range "OptRef"

Dim dataWb as Workbook
Set dataWb = Workbooks.Open(myfile)
With dataWb.Sheets("Sheet1")
shcontrol.range("A1") = ????
End With

TIA


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
referencing a 3D Named Range Robert H Excel Worksheet Functions 3 January 14th 08 05:46 PM
Referencing a named range based upon Range name entry in cell Barb Reinhardt Excel Worksheet Functions 14 June 20th 07 07:19 PM
Referencing a Dynamic Named Range in VBA [email protected] Excel Programming 1 February 13th 07 07:46 PM
referencing a named range from a closed workbook Gixxer_J_97[_2_] Excel Programming 4 April 8th 05 08:45 PM
VBA Referencing a Named Cell Range in another Workbook Frank & Pam Hayes[_2_] Excel Programming 5 June 29th 04 10:01 PM


All times are GMT +1. The time now is 01:37 PM.

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"