Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sheets Array?

12 views
Skip to first unread message

RichA

unread,
Jan 30, 2014, 8:11:40 AM1/30/14
to
I am looking to be able to copy a number of sheets to a new workbook. However, not always the same sheets.


Sub Macro1()
Sheets(Array("SheetA", "SheetB")).Select
Sheets(Array("SheetA", "SheetB")).Copy
End Sub


How do I either:
(a) set the array to be the selected sheets prior to the macro being run? [I tried selectedsheets.select but it errored?]

(b) Creat an inputbox that allows an array of sheets (they are not always next to each other)?

Many thanks,
Rich
0 new messages