If & Else
Hi,
I've been facing the same problem since I started with VB.
I'll give you an Example:
The Problem is Label2 works probably but Label1 not.
When Textbox1 doesn't have "Word" in it, it writes "Word found" but when Texbox1 doesn't have "Hello" in it, it writes "Hello not found"
I hope you could help me.
Thanks.
I've been facing the same problem since I started with VB.
I'll give you an Example:
Code:
If Textbox1.Text.Contains("Word") Then
Label1.Text = "Word Found"
Else
Label1.Text = "Word not Found"
EndIf
If Textbox1.Text.Contains("Hello") Then
Label2.Text = "Hello Found"
Else
Label2.Text = "Hello not Found"
The Problem is Label2 works probably but Label1 not.
When Textbox1 doesn't have "Word" in it, it writes "Word found" but when Texbox1 doesn't have "Hello" in it, it writes "Hello not found"
I hope you could help me.
Thanks.


![=]](/forum/images/emotions/=].gif)