S
Sloth
Below is some code I am working on. Basically it looks at specific cell A7.
If it is equal to zero then that row gets hidden when printing. I want all
rows to unhide after printing. How do I trigger this? The section under
Before_Save is what I would like to do after printing. Is there an easier
way to do this?
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Sheets("January").Select
If Cells(7, 1) = 0 Then
Rows("7:7").EntireRow.Hidden = True
End If
End Sub
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets(Array("January", "February", "March", "April", _
"May", "June", "July", "August", "September", _
"October", "November", "December", "Summary")).Select
Cells.Select
Selection.EntireRow.Hidden = False
Sheets("January").Select
Cells(1, 1).Select
End Sub
If it is equal to zero then that row gets hidden when printing. I want all
rows to unhide after printing. How do I trigger this? The section under
Before_Save is what I would like to do after printing. Is there an easier
way to do this?
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Sheets("January").Select
If Cells(7, 1) = 0 Then
Rows("7:7").EntireRow.Hidden = True
End If
End Sub
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets(Array("January", "February", "March", "April", _
"May", "June", "July", "August", "September", _
"October", "November", "December", "Summary")).Select
Cells.Select
Selection.EntireRow.Hidden = False
Sheets("January").Select
Cells(1, 1).Select
End Sub