PDA

View Full Version : CheckBox Issue (Should be Easy)



liamwhan
03-27-2011, 11:39 PM
Hi all,

I feel like an idiot, but I can not get this SIMPLEST of ALL Functions to work.

I have a userform that has an 'Agreement' Checkbox (i.e. I agree to the terms and conditions)

What I want is a simple CheckBox value check that displays a message If it is uncheck and then returns to the Userform so that the user can check the 'I agree' button.

I can get the message to display, the problem is that after the message displays and the user clicks ok, the form still proceeds to execute the other code when I need it only to return to the form (with the info the user entered STILL there) the code I'm using is below. Any help would be greatly appreciated.



CheckBox14.Value = False Then
MsgBox ("Please agree to the commitment statement before proceeding")
End If

fmcti
03-28-2011, 03:48 AM
if CheckBox14.Value = False Then
MsgBox ("Please agree to the commitment statement before proceeding")
Exit Sub
End If

liamwhan
03-28-2011, 02:16 PM
I am such an idiot.

I tried 'End' and 'End Sub'

Thank you so much.