T
Todd Huttenstine
On Userform1, I have TextBox1. I am trying to acheive the following... If
when the user clicks CommandButton1 and Textbox1 equals "" or "Enter Stat
Name here", then I would like a message box to popup telling the user
"INVALID DATA". If when the user clicks CommandButton1 and Textbox1 does
not equal "" or "Enter Stat Name here", then I would like the code to
continue to the next part of the code which would be the message box saying
"Are you sure?" Right now I am getting errors in the first messagebox.
Below is what I have so far?
Private Sub CommandButton1_Click()
If TextBox1.Value = "" Or "Enter Stat Name here" Then
MsgBox("Invalid Data", vbOKOnly) = vbOKOnly
Else
End If
If MsgBox("Are you sure?", vbYesNo) = vbNo Then
Exit Sub
End If
End Sub
Thanx
Todd Huttenstine
when the user clicks CommandButton1 and Textbox1 equals "" or "Enter Stat
Name here", then I would like a message box to popup telling the user
"INVALID DATA". If when the user clicks CommandButton1 and Textbox1 does
not equal "" or "Enter Stat Name here", then I would like the code to
continue to the next part of the code which would be the message box saying
"Are you sure?" Right now I am getting errors in the first messagebox.
Below is what I have so far?
Private Sub CommandButton1_Click()
If TextBox1.Value = "" Or "Enter Stat Name here" Then
MsgBox("Invalid Data", vbOKOnly) = vbOKOnly
Else
End If
If MsgBox("Are you sure?", vbYesNo) = vbNo Then
Exit Sub
End If
End Sub
Thanx
Todd Huttenstine