You have to open it.
But with "Application.ScreenUpdating = False" you don't notice this
This example open C:\data\ron.xls and copy a sheet to your ActiveWorkbook
After that it will close C:\data\ron.xls
Sub test()
Dim Wb1 As Workbook
Dim Wb2 As Workbook
Application.ScreenUpdating = False
Set Wb1 = ActiveWorkbook
Set Wb2 = Workbooks.Open("C:\data\ron.xls")
Wb2.Sheets("Sheet1").copy _
after:=Wb1.Sheets(Sheets.Count)
Wb2.Close False
Application.ScreenUpdating = True
End Sub
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.