Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cancel printing a worksheet | Excel Worksheet Functions | |||
Cancel printing a worksheet | Excel Worksheet Functions | |||
Workbook_BeforeClose(Cancel As Boolean) - Cancel won't work | Setting up and Configuration of Excel | |||
Printing code | Excel Discussion (Misc queries) | |||
Exit Code Upon Cancel On Type 8 Input Box | Excel Discussion (Misc queries) |