Private Sub AskToSave()
Dim Answer As MsgBoxResult
If Changed Then
Answer = MsgBox("Do you want to save?", _
MsgBoxStyle.YesNoCancel + MsgBoxStyle.Question, "Save")
If Answer = MsgBoxResult.Yes Then
Save() 'name of procedure is changed!
End 'end the program after saving
End If
If Answer = MsgBoxResult.No Then
End 'end the program without saving
End If
'Do NOT end if they cancel!
Else
End 'end the program if no changes
End If
End Sub 'AskToSave
Test all of the options and save all of the files in the application.