on 12-01-2007 6:01 AM
how to check combo selected value to string and if combo box selected value is empty, how to compare to empty string
here:
If ComboBox.Selected = Nothing Then
MsgBox("No value selected in combo")
Else
MsgBox("Selected value in combo is " & ComboBox.Selected.Value)
End If
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Madhu,
You can do it by putting your value checking in a try...catch clause like displayed below. If an error is received it means no entry is selected in the combo box. The value field should always have a value, so it can't be blank with a valid entry. If you receive a blank value you know nothing is selected.
try
sValue = oCombo.Selected.Value
catch
sValue = ""
end try
Hope it helps,
Adele
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.