Thread: workbooks.open
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jim Cottrell Jim Cottrell is offline
external usenet poster
 
Posts: 2
Default workbooks.open

That worked perfectly!
Thanks so much!

"JE McGimpsey" wrote:

After the first workbooks.open, the opened workbook is the active
workbook, so your reference to Sheets("files").Range(..) is invalid
unless the just opened workbook has a worksheet named "files".

Try:

With ThisWorkbook.Sheets("files")
Workbooks.Open .Range("C3").Value
Workbooks.Open .Range("C4").Value
End With

In article ,
Jim Cottrell wrote:

I would like to open 4 files with a macro. If I just open one file it works.
If I try to open more than one, I get a subscript out of range error.
Can you help me with this?
Thanks!

Workbooks.Open Sheets("files").Range("C3").Value
Workbooks.Open Sheets("files").Range("C4").Value