Matt142 Matt142 - 1 year ago 86 Question

Combobox returning null when it's not?

I have the following if statement:

If line.Contains(":") And Not line.Contains(removeCombo.SelectedItem) Then
End If

removeCombo being the combobox and the variable 'line' being the current line in a file. The if statement returns 'Value Cannot Be Null.' Why is this? I have also chosen a value in the combobox.

Answer Source

try replacing:



Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download