A
Al
I'm trying to copy out worksheets Tab1 and Tab2 but am
receiving a subscript out of range error. The Worksheets
do exist and the code is attached below.
I've simplified this problem, as I do need a Variable
to denote which worksheets will be copied out.
(Otherwise I could have used
Sheets(Array("Tab1","Tab2")).Copy
which works)
Sub test()
Dim s As String
s = """" & "Tab1" & """" & ", " & """" & "Tab2" & """"
Sheets(Array(s)).Copy
End Sub
Thanks in advance.
receiving a subscript out of range error. The Worksheets
do exist and the code is attached below.
I've simplified this problem, as I do need a Variable
to denote which worksheets will be copied out.
(Otherwise I could have used
Sheets(Array("Tab1","Tab2")).Copy
which works)
Sub test()
Dim s As String
s = """" & "Tab1" & """" & ", " & """" & "Tab2" & """"
Sheets(Array(s)).Copy
End Sub
Thanks in advance.