View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Umlas[_3_] Bob Umlas[_3_] is offline
external usenet poster
 
Posts: 320
Default Use code to cancel printing

Put code in the workbook_beforeprint event -- you can do something like:
Private Sub Workbook_BeforePrint(Cancel as Boolean)
if Msgbox(Did you change the date?",vbyesno+vbquestion)=vbno then
msgbox "Please do so, then try again.",vbexclamation
cancel=true
end if
End Sub

Bob Umlas
Excel MVP

"Jim " wrote
in message ...
We use spreadsheets with week ending dates, but many users
forget to change the date. This leads to a lot of
reprinting. I would like to use a message box with
vbYesNo, Yes would allow the spreadsheet to print, No
would cancel the print.
Any ideas?
Thanks,
JT