Validation

Glennzo

Registered User.
Local time
Today, 01:52
Joined
Jan 24, 2003
Messages
22
Hey folks, I'm using an option group in my program and would like to use a msgbox for confirmation when the user clicks on any one of the option buttons. I'd like to have it function so that if the user clicks OK in the msgbox the change is completed but if the user clicks cancel the change is cancelled. I've been playing around with this but don't seem to be able to grasp the idea.

Can anyone steer me in the right direction?

Glennzo...
 
This should get you started...

Code:
    Beep
    If MsgBox("Is it safe to continue?", vbQuestion + vbOKCancel, "Continue?") = vbOK Then
        MsgBox "user clicked OK"
        'your continue code goes here
    Else
        MsgBox "user clicked Cancel"
        'your cancel code goes here
    End If
HTH
 
Thanks ghudson. Appreciate the help. I've basically gotten this far. It's the underlying code that eludes me. How does one cancel a change to an option group?

Glennzo...
 
I'm guessing you're using the BeforeUpdate event on your option group. For Cancel, Me.(OptionGroupName).Undo should 'De-select' the chosen option if it's a bound control.

HTH,
John
 

Users who are viewing this thread

Back
Top Bottom