View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Copy Multiple Sheets, Except Q


Sub CopyBook()

First = True
For Each Sht In ThisWorkbook.Sheets
Select Case Sht.Name

Case "A", "B", "C"
'Do Nothing
Case Else
If First = True Then
'Create New workbook
Sht.Copy
Set NewBk = ActiveWorkbook
First = False
Else
With NewBk
Sht.Copy after:=.Sheets(.Sheets.Count)
End With
End If
End Select
Next Sht

End Sub


"Seanie" wrote:

How could I tweak the code below that will copy all sheets from my
ActiveWorkbook EXCEPT for sheets A;B and C?

Code below will copy 2 specified sheets, but I want to twist this
around as I have a large number to copy and don't want to hard code
them as below

Set Sourcewb = ActiveWorkbook
Sourcewb.Sheets(Array("Header", "Order")).Copy
Set Destwb = ActiveWorkbook