Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cancel Macro for Excel

Status
Not open for further replies.

yari130

Technical User
Jan 13, 2004
11
0
0
CA
Hello. Very simple, I need a macro that will allow me to do basically what the save before exit msgBox shows. I need this as a safety before closing the program to apply the filter for the next user.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
MsgBox ("Message to M H Beck; PLEASE APPLY FILTER TO YE"),vbOkCancel
End Sub

Ok will let me go on to the save msgbox and exit.

Cancel will return me to my workbook to Apply the filter.

If possible, I would like the buttons to read as follows:

Ok = It's Done

Cancel = Re-apply filter

Thank you for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top