Thomas Kuriakose
Active Member
Respected Sirs,
We have three worksheets in one workbook that need to be printed if the listed check boxes are checked and listed cells are not blank, else it should not print the worksheets.
Kindly find attached the workbook with conditions mentioned.
I found a code on the internet for printing which does not have the conditions, kindly guide on how this code can be used to print along with the conditions.
Thank you very much for your support always,
with regards,
thomas
We have three worksheets in one workbook that need to be printed if the listed check boxes are checked and listed cells are not blank, else it should not print the worksheets.
Kindly find attached the workbook with conditions mentioned.
I found a code on the internet for printing which does not have the conditions, kindly guide on how this code can be used to print along with the conditions.
Thank you very much for your support always,
with regards,
Code:
Sub Print_Worksheets()
Application.Dialogs(xlDialogPrinterSetup).Show
'ActiveSheet.PrintPreview
Worksheets.PrintOut
ActiveSheet.Select
'Dim CurVis As Long
'Dim sh As Worksheet
'For Each sh In ActiveWorkbook.Worksheets
'With sh
'CurVis = .Visible
'.Visible = xlSheetVisible
'Application.Dialogs(xlDialogPrinterSetup).Show
'ActiveSheet.PrintPreview
'.PrintOut
'.Visible = CurVis
'End With
'Next sh
End Sub