daveofgv
Well-known member
I have a form with a textbox1 where the user can either put a demo version code or the full version code. (both product ID's are hard coded).
I have a message box saying demo or full version depending on which code the user enters. However, when something other then the two numbers are entered in the textbox1 I would like a message box appear saying "Wrong Product Number. Please Try Again".
I have " If TextBox1.Text = "" Then" but that only makes the message box appear if nothing is entered into the textbox1.
Anyone know what to enter to make a message box appear if something that is not the correct number is entered.
Thanks in advanced
daveofgv
I have a message box saying demo or full version depending on which code the user enters. However, when something other then the two numbers are entered in the textbox1 I would like a message box appear saying "Wrong Product Number. Please Try Again".
I have " If TextBox1.Text = "" Then" but that only makes the message box appear if nothing is entered into the textbox1.
VB.NET:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
If TextBox1.Text = "4321" Then 'Full Version Code
MessageBox.Show("Full Version Enabled")
Button3.Enabled = True
Main.Button1.Visible = True
Main.Button6.Visible = False
Else
If TextBox1.Text = "1234" Then 'Demo Verison Code
MessageBox.Show("Demo Version Enabled. To purchase the full version please buy Specific Site Plus")
Button3.Enabled = True
Main.Button1.Visible = False
Main.Button6.Visible = True
Else
If TextBox1.Text = "" Then
MessageBox.Show("Wrong Product ID. Please Try Again")
End If
End If
End If
End Sub
Anyone know what to enter to make a message box appear if something that is not the correct number is entered.
Thanks in advanced
daveofgv
Last edited by a moderator: