not equal

digita

Active member
Joined
Jul 8, 2004
Messages
29
Programming Experience
1-3
hi,

This should be very simple but how do i set something to not equal the other thing . i mean like this.

VB.NET:
[size=2][/size][size=2][color=#0000ff]Private[/color][/size][size=2] [/size][size=2][color=#0000ff]Sub[/color][/size][size=2] frmDataInsert_Load([/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] sender [/size][size=2][color=#0000ff]As[/color][/size][size=2] [/size][size=2][color=#0000ff]Object[/color][/size][size=2], [/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] e [/size][size=2][color=#0000ff]As[/color][/size][size=2] System.EventArgs) [/size][size=2][color=#0000ff]Handles[/color][/size][size=2] [/size][size=2][color=#0000ff]MyBase[/color][/size][size=2].Load

[/size][size=2][color=#0000ff]If[/color][/size][size=2] txtBetaalMethode.SelectedText = "" [/size][size=2][color=#0000ff]Then

[/color][/size][size=2]lblBetaalWarning.Text = "LET OP: De Betaalmethode is niet gekozen."

[/size][size=2][color=#0000ff]ElseIf[/color][/size][size=2] txtBetaalMethode.SelectedText == ""

lblBetaalWarning.Text = ""

[/size][size=2][color=#0000ff]End[/color][/size][size=2] [/size][size=2][color=#0000ff]If

[/color][/size][size=2][/size][size=2][color=#0000ff]End[/color][/size][size=2] [/size][size=2][color=#0000ff]Sub

[/color][/size]

I thought just a double = would do the job, but that's not possible, it gives me the Expression Expected error.

Thanks
 

Schenz

Well-known member
Joined
Sep 11, 2004
Messages
181
Location
Cincinnati, OH
Programming Experience
5-10
I believe that you are looking for this:
VB.NET:
PrivateSub frmDataInsert_Load(ByVal sender AsObject, ByVal e As System.EventArgs) HandlesMyBase.Load

   If txtBetaalMethode.SelectedText = "" Then
      lblBetaalWarning.Text = "LET OP: De Betaalmethode is niet gekozen."
   ElseIf txtBetaalMethode.SelectedText <> "" ' In VB <> means is not equal to
      lblBetaalWarning.Text = ""
   EndIf

EndSub
 
Top Bottom