You can open a closed book (opening in the background is much easier than working with closed books), and then copy all sheets with Test.xls to a specific part of another book (i.e. before sheet 00 ) in one line
Code below:
- opens a closed book
c:\temp\Test.xls") - copies all sheets before sheet
00 in the book containing the code - closes
Test.xls
The code suppressed any warnings, code events in Test.xls and escaping
Sub CopyAll() Dim Wb1 As Workbook Dim Wb2 As Workbook With Application .ScreenUpdating = False .EnableEvents = False .DisplayAlerts = False End With Set Wb1 = Workbooks.Open("c:\temp\Test.xls") Set Wb2 = ThisWorkbook Wb1.Sheets.Copy Before:=Wb2.Sheets("00") Wb1.Close False With Application .ScreenUpdating = True .EnableEvents = True .DisplayAlerts = True End With End Sub
source share