G
Guest
Guest
I want to write a macro that will select the pages in an open workbook and then save them to a new workbook.
The following example works provided the sheets have the name 1,2 or 3. My problem is that the sheets do not always have the same name. How can I modify this macro? or is there a better way.
Sub Macro1()
'
Sheets(Array("1", "2", "3")).Select
Sheets("3").Activate
Sheets(Array("1", "2", "3")).Copy Before:=Sheets(1)
End Sub
Thanks
John
The following example works provided the sheets have the name 1,2 or 3. My problem is that the sheets do not always have the same name. How can I modify this macro? or is there a better way.
Sub Macro1()
'
Sheets(Array("1", "2", "3")).Select
Sheets("3").Activate
Sheets(Array("1", "2", "3")).Copy Before:=Sheets(1)
End Sub
Thanks
John