I have absolutely no idea why this wouldn't work? I thought it was working last night but apparently not?
What I'm trying to do is prevent an item from being added to the Listbox1 list twice...
So if the item is within the log, dont add it to listbox1. If it's not in the log or in listbox1 then add it.
If its not in logcmb but already in listbox1 then don't add it.
The logcmb is saved and loaded at form load and unload.
Code: Code:
If LogCmb.Items.Contains(tmp) Then 'don't add it Else If ListBox1.Items.Contains(tmp) Then 'This is already in the list Else If InStr(tmp, "http") Then 'if the string contains http then don't add it Else ListBox1.Items.Add(LCase(tmp)) statusbarlbl.Text = ListBox1.Items.Count & " available" End If End If End If
![]()




Reply With Quote