I had a macro I developed in Excel that I was trying to incorporate into visual basic to print a specific range from each sheet except for sheets with specific names. But it doesn't seem to move off of the first sheet, named Menu, and it wants to print what is on the menu sheet. Thus far I have:
Private Sub CommandButton3_Click()
Dim sh As Worksheet
Dim DestSh As Worksheet
Dim Last As Long
For Each sh In ThisWorkbook.Worksheets
If sh.Name <> "Template" And sh.Name <> "names" And sh.Name <> "Menu" And sh.Name <> "Reports" And sh.Name <> "Master" Then
Range("X1:AG43").Select
Selection.PrintOut Copies:=1
End If
Next
On Error Resume Next
End Sub
Any suggestions?
Private Sub CommandButton3_Click()
Dim sh As Worksheet
Dim DestSh As Worksheet
Dim Last As Long
For Each sh In ThisWorkbook.Worksheets
If sh.Name <> "Template" And sh.Name <> "names" And sh.Name <> "Menu" And sh.Name <> "Reports" And sh.Name <> "Master" Then
Range("X1:AG43").Select
Selection.PrintOut Copies:=1
End If
Next
On Error Resume Next
End Sub
Any suggestions?