Pull Data from a closed workbook, without opening it.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does anyone know the code to use to be able to pull data from a closed workbook, without opening it?
 
without opening it?

I believe that opens the workbook, Dave.

Maybe suggesting John Walkenbach's method, or use of ADO or simply putting a
link in a cell (fastest) would be more appropriate.
 
I would go with a link in a cell, if the cell in the workbook you ar
looking for is always changeing try using vlookup.

Keith
www.kjtfs.com
 
Harlan corrected me on this one, too. I once posted that it starts another
instance of excel and opens the other file there and retrieves the value.

Actually, it uses the same techniques that John Walkenbach does to retrieve a
value from a closed workbook.

But it wouldn't be necessary to use Harlan's routine in a case where the macro
itself will retrieve the value.

To the OP: Harlan's routine is very nice when called from a worksheet where the
closed workbook can vary (based on another cell--and =indirect() would be used.

And in the most basic sense, I guess I agree with You and Keith--just use a
formula in a cell that would point to the cell you want to retrieve.
 
Ok, I stand corrected, but then it does incur overhead beyond John's
technique. In any event, I wouldn't use the word "nice" to describe opening
another instance of Excel in a UDF/as part of the calculation chain, but if
the requirement is essential, then it does the job. <g>
 
I only meant nice when you'd have to use =indirect().

And I agree wholeheartedly about overkill in some (this??) case.

But sometimes answers come from muscle memory--not the grey wet stuff.

Happy New Year.


Tom said:
Ok, I stand corrected, but then it does incur overhead beyond John's
technique. In any event, I wouldn't use the word "nice" to describe opening
another instance of Excel in a UDF/as part of the calculation chain, but if
the requirement is essential, then it does the job. <g>
 

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