how can i get data from an un_opened excel file using codes

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

Guest

i want to write codes to retrieve data from an unopened excel file. how can
get it? thanks a lot.
 
HF,

You can try this one :

Sub TESTretrieve()
With Activeworkbook.sheets(1).range("A1")
.FormulaArray = "='C:\[Book1.XLS]Sheet4'!$A$1"
.Value= .Value
End With
End sub

note that file C:\Book1.xls is must be available .!
 

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