I am trying to use the beforeprint command to hold printing and put up a message box. If the user answers YES, then printing can occur. Although I have used this before, I can't get it to run (yes the file is saved as macro enabled). I do not want to use a macro button. I just want the user to be notified after they hit file/print from the menu.
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim Confirm As VbMsgBoxResult
Application.EnableEvents = False
Cancel = True
Confirm = MsgBox("Are the dates and hours OK for your OT?", vbYesNo)
If Confirm = vbYes Then ThisWorkbook.Print
Application.EnableEvents = True
End Sub
Thanks
Bookmarks