how do i get a message to pop up when closing excel 2007

B

bobhogg

I wish to prompt a user to do something when they close excel 2007 i want a
message to pop up on closing or saving
 
F

FSt1

hi
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel as Boolean)

MsgBox("Boo!!!!")

End Sub
Private Sub Workbook_BeforeClose _
(Cancel As Boolean)

MsgBox ("Boo!")

End Sub

this is workbook code so you can call these events from the workbook module.
or substitute your message and paste into a workbook module.

Regards
FSt1
 
Top