How to print hidden and visible worksheets in a workbook with VBA. Watch the training video below:
Watch the video on YouTube.
Here’s the complete VBA code to print all worksheets in an Excel workbook quickly and easily:
Sub Print_Visible_Hidden_Sheets()
Dim myBoolean As Long
Dim wksht As Worksheet
Dim myBoolean As Long
Dim wksht As Worksheet
For Each wksht In ActiveWorkbook.Worksheets
With wksht
With wksht
myBoolean = .Visible
.Visible = xlSheetVisible
‘.printout
.PrintPreview
.Visible = myBoolean
End With
Next wksht
End Sub
Further Reading:
God bless you and put the quality of your courses in your balance of good
Abu.Talha.Of.Morooco