Hi folks,
Need a little help on this code -
Private Sub UserForm_Terminate()
Dim Answer As String
Dim MyNote As String
'Place your text here
MyNote = "Did You Save?"
'Display MessageBox
Answer = MsgBox(MyNote, vbQuestion + vbYesNo, "???")
If Answer = vbNo Then
'Code for No button Press
MsgBox "Ensure you save!"
SAVEPDF.Show vbModeless
Else
Application.Quit
Application.DisplayAlerts = False
End If
End Sub
Im trying to get the userform to cancel terminate if answered no but the userform terminates anyway
any help would be great!
Need a little help on this code -
Private Sub UserForm_Terminate()
Dim Answer As String
Dim MyNote As String
'Place your text here
MyNote = "Did You Save?"
'Display MessageBox
Answer = MsgBox(MyNote, vbQuestion + vbYesNo, "???")
If Answer = vbNo Then
'Code for No button Press
MsgBox "Ensure you save!"
SAVEPDF.Show vbModeless
Else
Application.Quit
Application.DisplayAlerts = False
End If
End Sub
Im trying to get the userform to cancel terminate if answered no but the userform terminates anyway
any help would be great!