' if a user wants to abort the changes then load the last
' saved settings and set a new oldsettings, and close the settings form
Frm_Main.mnu_pref_Click
End Sub
Private Sub Cmd_sOk_Click()
Dim Msg As String
'Set newprefs string to controll the old one
NewPrf = GetPrefs
'controll the changes... if made any
If NewPrf <> OldPrf Then
Msg = MsgBox("You've changed some settings but didn't save then." & vbCrLf & vbCrLf & "Would you like to save then ?", vbQuestion & vbYesNo, "Save Settings ?")
Select Case Msg
Case 6 ' Yes save them...
Cmd_sSave_Click 'Save the settings...
Cmd_sOk_Click 'Run the OK command again (just checking)
Case 7 ' No don't save them
Call LoadPrefs 'Load the old settings.
Cmd_sOk_Click 'Run the OK command again (Just checking)
End Select
Else 'no changes are made... (or the are saved...)