PDA

View Full Version : Message Box Before Saving Document



Lucero
04-10-2012, 10:13 PM
Hello,
Does anybody know how to make a Message Box appear every time the user saves an excel document. The box will say "Please don't forget to sign the document before submitting it". Users tend to forget it so I want to add the message box to remind them every time they save the doc. I know it could be annoying but that's fine.

Thank you!!!

~Lucero

Admin
04-10-2012, 10:16 PM
Hi,

this goes in workbook module.


Private Sub Workbook_BeforeClose(Cancel As Boolean)
MsgBox "Please don't forget to sign the document before submitting it"
End Sub

Rasm
04-15-2012, 07:09 AM
strMsg = "You must select the node - before you can delete it."
intMsgType = vbExclamation + vbOkCancel
intResponse = MsgBox(strMsg, intMsgType, "Operator action")



Wirh this example you can also exit your routine - depending on selection - Just an example