ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   interrogating a workbook WITHOUT opening it from VBA (https://www.excelbanter.com/excel-programming/326525-interrogating-workbook-without-opening-vba.html)

roger butler

interrogating a workbook WITHOUT opening it from VBA
 
Hi All

A few years ago i remember reading that it is possible
to "get at" values stored in another workbook from VBA,
without having to open that workbook. It went something
like :

range("c:\myfile.xls[Sheet1]!D2") etc etc

Can someone remind me how to do this?

Thanks

Rog

roger butler

interrogating a workbook WITHOUT opening it from VBA
 
Not sure if this was the way i read, but i found one way
to do it :

just write the link in to the cell directly :

eg

range("a1").formula ="='X:\Derivatives\[he Euronext.xls]
Automate'!AF70"

If anyone has a better way, please advise!

Cheers

Rog




-----Original Message-----
Hi All

A few years ago i remember reading that it is possible
to "get at" values stored in another workbook from VBA,
without having to open that workbook. It went something
like :

range("c:\myfile.xls[Sheet1]!D2") etc etc

Can someone remind me how to do this?

Thanks

Rog
.


TroyW[_2_]

interrogating a workbook WITHOUT opening it from VBA
 
Roger,

Here is one method. Read the caveat at the bottom of the page carefully.
http://www.j-walk.com/ss/excel/tips/tip82.htm

Another method would be to use ADO to work with the Excel file directly
http://support.microsoft.com/default...b;en-us;278973

Troy

"Roger Butler" wrote in message
...
Not sure if this was the way i read, but i found one way
to do it :

just write the link in to the cell directly :

eg

range("a1").formula ="='X:\Derivatives\[he Euronext.xls]
Automate'!AF70"

If anyone has a better way, please advise!

Cheers

Rog




-----Original Message-----
Hi All

A few years ago i remember reading that it is possible
to "get at" values stored in another workbook from VBA,
without having to open that workbook. It went something
like :

range("c:\myfile.xls[Sheet1]!D2") etc etc

Can someone remind me how to do this?

Thanks

Rog
.




roger butler

interrogating a workbook WITHOUT opening it from VBA
 
Thanks, knew i'd seen it somewhere!

ADO is good, but we don't have the latest version of ADO -
we're so out of date here!



-----Original Message-----
Roger,

Here is one method. Read the caveat at the bottom of the

page carefully.
http://www.j-walk.com/ss/excel/tips/tip82.htm

Another method would be to use ADO to work with the Excel

file directly
http://support.microsoft.com/default.aspx?scid=kb;en-

us;278973

Troy

"Roger Butler"

wrote in message
...
Not sure if this was the way i read, but i found one way
to do it :

just write the link in to the cell directly :

eg

range("a1").formula ="='X:\Derivatives\[he Euronext.xls]
Automate'!AF70"

If anyone has a better way, please advise!

Cheers

Rog




-----Original Message-----
Hi All

A few years ago i remember reading that it is possible
to "get at" values stored in another workbook from VBA,
without having to open that workbook. It went something
like :

range("c:\myfile.xls[Sheet1]!D2") etc etc

Can someone remind me how to do this?

Thanks

Rog
.



.



All times are GMT +1. The time now is 03:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com