Matt Miller
asked on
Trying to Copy sheets to a new workbook then hide sheets on original workbook
I'm trying to copy a group of sheets to a new workbook and then hide the initial sheets on the original workbook?'
Thanks
Sheets(Array("Read Me", "Sheet1", "Sheet2")). _
Select
Sheets(Array("Read Me", "Sheet1", "Sheet2")). _
Copy
'Hide Readme
Thanks
After copying to a new workbook, the new sheets will be active.
Therefore you will have to re-activate the source workbook to hide the original sheets.
Therefore you will have to re-activate the source workbook to hide the original sheets.
@Rob
Not if you hold a reference to them, either with a With block, or a variable.
Not if you hold a reference to them, either with a With block, or a variable.
@Rory - didn't know that, everyday's a school day.
Otherwise, I would have suggested:
Source = ActiveWorkbook.Name
Sheets(Array("Read Me", "Sheet1", "Sheet2")).Select
Sheets(Array("Read Me", "Sheet1", "Sheet2")).Copy
Windows(Source).Activate
Sheets(Array("Read Me", "Sheet1", "Sheet2")).Visible = xlSheetHidden
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much. This is exactly what I needed.
Pleased to help.
Open in new window