Listbox items count check failing
Ok, I don't know what is wrong with this code, but it is not detecting when there are no items in the listbox. It ALWAYS returns that there is something in the listbox, even when there is not and keeps erroring on the line of code in BOLD.
Code:
Dim ActiveMedProbsResult as String
If lstActiveMedProbs.Items.Count = 0 Then
ActiveMedProbsResult = ""
Else
ActiveMedProbsResult = String.Join(", ", ClientActiveMedProbs)
ActiveMedProbsResult = Left(ActiveMedProbsResult, Len(ActiveMedProbsResult) - 2)
End If
Re: Listbox items count check failing
If you put a breakpoint on the IF line, what is the value of lstActiveMedProbs.Items.Count, when there are no items in the list?