The following code is found in ThisWorkbook.
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
Application.ScreenUpdating = False
For Each wkSht In ThisWorkbook.Worksheets
SetHeader wkSht
Next wkSht
Application.ScreenUpdating = True
End Sub
Before this kicks off I need it to check a condition. I.e. cell F9 is less than 232
If true it proceeds with the SetHeader wkSht code or jsut continues the macro.
If False it stops the macro and gives a message that they must reduce the # of chars to less than 232. They click ok and it retunrs them back to worksheet titled headerpage.
Any help is appreciated.
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
Application.ScreenUpdating = False
For Each wkSht In ThisWorkbook.Worksheets
SetHeader wkSht
Next wkSht
Application.ScreenUpdating = True
End Sub
Before this kicks off I need it to check a condition. I.e. cell F9 is less than 232
If true it proceeds with the SetHeader wkSht code or jsut continues the macro.
If False it stops the macro and gives a message that they must reduce the # of chars to less than 232. They click ok and it retunrs them back to worksheet titled headerpage.
Any help is appreciated.