D
Debbiedo
I have the following code in my MS Word 2003 protected form to
display
a message box when saving but how can I modify it to display when
exiting (ie, hitting the X in the corner or Exit from the File menu)?
Public Sub FileSave()
Dim Answer As Integer
Dim Msg As String
On Error Resume Next
Msg = "If Student ID is NOT filled out" & _
vbCr & "click Cancel and go back."
Answer = MsgBox(Msg, vbOKCancel)
If Answer = vbOK Then
ActiveDocument.Save
End If
End Sub
Thanks in advance
display
a message box when saving but how can I modify it to display when
exiting (ie, hitting the X in the corner or Exit from the File menu)?
Public Sub FileSave()
Dim Answer As Integer
Dim Msg As String
On Error Resume Next
Msg = "If Student ID is NOT filled out" & _
vbCr & "click Cancel and go back."
Answer = MsgBox(Msg, vbOKCancel)
If Answer = vbOK Then
ActiveDocument.Save
End If
End Sub
Thanks in advance