INDIRECT() calling a separate workbook

S

smaruzzi

I link several documents using the INDIRECT() function dynamically selecting
which XLS file to open based on internal parameters. While this solution is
super effective, it requires that the target file (the one pointed by the
INDIRECT() function) is already opened to avoid a REF# error.

I was wondering if there is a smart, and automated way to open several files
before using them so that the INDIRECT() function can effectively retrieve a
value in the desired cell. In other words, is there a simple way to open
several files simultaneously so that all the required data are accessible
when needed?

Thanks, Stefano
 
D

Don Guillett

Sub UpdateStockFiles()
Workbooks.Open FileName:="C:\folder\xxxfile1.xls"
Workbooks.Open FileName:="C:\folder\aaafile2.xls"
Workbooks.Open FileName:="C:\folder\fkkkile3.xls"
End Sub
 

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

Top