cells from another workbook

G

Guest

I have the following code that works in a loop

Cells(j, 2) = Sheets("Sheet1").Cells(j, 5)

What I am struggling to do is get this to work when "Sheet1" is in another
workbook (that will be open). Is there code that would read something like:

Cells(j, 2) = Workbooks("Base Data.xls").Sheets("Sheet1").Cells(j, 5)

Thanks in advance
 
G

Guest

The code you wrote should work assuming the file Base Data.xls is open and
there is a sheet named Sheet1 in that workbook.

Mike
 

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