0

I have like 30 excel files in a directory all have only one sheet.

I want to get all these 30 sheets and place them in a single workbook that also has other stuff in it.

Is there a way to copy all these sheets without open copy-paste close procedure 30 times using vba?

I would be really happy if I can just get the sheets without having to open them all.

yatici
  • 537
  • 3
  • 11
  • 20
  • There is no supported way to get data from a file without opening it. – RBarryYoung Jun 26 '13 at 19:45
  • Yes, you have to open them, but you can turn off the `ScreenUpdating` and use the Worksheet's `Copy` method to copy the entire sheet, rather than using the clipboard. `Sheets("Sheet2").Copy Before:=Sheets(4)` – Andy G Jun 26 '13 at 19:52
  • It is, however, possible to obtain data from an unopened workbook, using a database connection and `CopyFromRecordset`, but opening and closing them would be simpler. – Andy G Jun 26 '13 at 19:54
  • Might want to look into ADO – dennythecoder Jun 26 '13 at 21:28

0 Answers0