lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
Can I copy a sheet from ThisWorkbook to another workbook which is closed but in the same folder. Is that possible or the second workbook has to be open. I know how to move/copy a sheet inside same workbook or to another opened workbook but my code below failed to copy a sheet to second workbook which is closed. Thank you so much.
Can I copy a sheet from ThisWorkbook to another workbook which is closed but in the same folder. Is that possible or the second workbook has to be open. I know how to move/copy a sheet inside same workbook or to another opened workbook but my code below failed to copy a sheet to second workbook which is closed. Thank you so much.
Code:
Sub ws_copy_out()
Dim x As Workbook
Set x = Workbooks("book2.xlsx")
Workbooks(1).Worksheets(1).Copy after:=x.Worksheets(1)
End Sub
Last edited: