Hello everyone
I have an order form with multiple options listed. In cells B13:B53 I have checkboxes (linked to those cells). Some rows instead of checkboxes, I have a quantity set to "0" by default. This sheet is protected.
I would like it to print only the rows that have TRUE in column B or a number that is greater than 0. The code I have is not working:
Any input is appreciated. Been banging my head against the wall trying to get this working
I have an order form with multiple options listed. In cells B13:B53 I have checkboxes (linked to those cells). Some rows instead of checkboxes, I have a quantity set to "0" by default. This sheet is protected.
I would like it to print only the rows that have TRUE in column B or a number that is greater than 0. The code I have is not working:
Code:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Select Case Worksheets("Sheet2").Range("B13:B53").Text
Case "FALSE", "0"
Worksheets("Sheet2").Rows("B13:B53").EntireRow.Hidden = True
End Select
Application.Dialogs(xlDialogPrint).Show
End Sub
Any input is appreciated. Been banging my head against the wall trying to get this working