Hello group,
I am trying to program a macro that will exclude certain worksheets when an entire excel workbook is printed. I got the following code after an internet search, and it works well for a single sheet to be excluded (let’s call the worksheet ‘aaa’).
Sub don’t_pirnt_sheet()
Dim sht
Application.ScreenUpdating = False
For Each sht In Sheets
If sht.Visible And sht.Name “aaa” Then
With sht
.PrintOut copies:=1
End With
End If
Next
Sheets(“aaa”).Select
Application.ScreenUpdating = True
End Sub
Now I am trying to add a couple of other worksheets (say ‘bbb’ and ‘ccc’) to the ones not to be printed, but don’t know how to add those to the code. Could someone suggest the correct language? Thanks so much in advance.
-Satnair