Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you.
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
='[C:\My folder\My File.xls]Sheet3'!A1
You can put that formula in a cell, then replace it with the value returned (fastest approach). Another: http://www.j-walk.com/ss/excel/tips/tip82.htm VBA Function to Get a Value From a Closed File from John Walkenbach's site. -- Regards, Tom Ogilvy "Oasis" wrote in message ... Thank you. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
There are several options:
1) Use a linked cell in the new worksheet. General form of the formula would be: ='Link File.xls'!$A$1 (or whatever cell you want) If you need to use this value for further calculations, just use the value in the Range. 2) Open the book (hidden, if desired) and read the cell value using Automation: Dim LinkBook as Workbook Set LinkBook = Workbooks.Open("Link File.xls") LinkedCellVal = LinkBook.Sheets("LinkSheet").Range("$A$1").Value LinkBook.Close Set LinkBook = Nothing 3) Use a database query (either MSQuery or ADO methods in VBA) to read the value from the closed book. Too complex for a quick explanation, search the knowledge base/MSDN library for more info. 4) Use DDE (Dynamic Data Exchange) - also a complex subject, will have to refer you again to MSDN library. Best way depends on tradeoff of complexity/flexibility "Oasis" wrote: Thank you. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Opening a workbook if not opened, going to it if already opened | Excel Programming | |||
Opening a workbook if not opened, going to it if already opened | Excel Programming | |||
Opening a workbook if not opened, going to it if already opened | Excel Programming | |||
How to see if the opened workbook is opened by another user ? | Excel Programming | |||
Sheets select method fails when workbook is opened by another workbook | Excel Programming |