interrogating a workbook WITHOUT opening it from VBA

  • Thread starter Thread starter roger butler
  • Start date Start date
R

roger butler

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
 
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
 
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 said:
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
.
 
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

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
.


.
 

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

Back
Top