Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

extract cell content of another excel file

Status
Not open for further replies.

jflaurin

Technical User
Dec 1, 2007
12
Basically I need to acces another Excel file and get the value from cell B2 and copy if into my main Excell file into cell D1

So I'm using the following code to let the user choose the excel file where he'll extract the data from

Code:
FileToOpen = Application.GetOpenFilename("Excel (*.xls), *.xls")

This will return the full path of the file I want to extract the data...The part I can't figure oyt is how do I get cell C2 value from FileToOpen and copy it into my main Excel file cell D1 on sheet " Master list". The main excel file is from where I'll run the macro code.

 
Use the Workbooks.Open method

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
can you give me some code example. I may sound smart but I"m really not !!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top