I would like to know, how to make ElseIf
statement check if a string in a textbox equals to the string in My.Settings.Something
?
Asked
Active
Viewed 189 times
0

Alex
- 4,821
- 16
- 65
- 106

TheCreepySheep
- 125
- 1
- 5
- 13
-
3`elsif My.Settings.Something = textbox.Text` – user1937198 Jun 10 '13 at 19:14
-
What did you try? What are you having trouble with? – SLaks Jun 10 '13 at 19:44
1 Answers
1
Basically :
If My.Settings.Something <> TextboxName.Text Then
// to do if...
ElseIf My.Settings.Something = TextboxName.Text Then
// to do else if...
ElseIf My.Settings.Something = 999 Then
// to do else if...
Else
// to do else...
End If
Depending on variable types you using in the settings you might need to use My.Settings.Something.ToString() instead of My.Settings.Something
Additionally, it might be needed to first store the variable from the textbox into a variable of the right type.
Dim dblVar as Double
dblVar = TextBoxName.Text

Jacob Siemaszko
- 346
- 1
- 5
- 20