Hello everyone, I have a question about list boxes

I want to know how to test the 1st list box if it has items more than the other list box but by one item, here is what i have:

If lstInvisibleTv.Items.Count > lstInvisiblePc.Items.Count Then

it works good if the lstInvisibleTv list box is greater than the other list box by one but it also works if it is greater the other one by one or more which I do not want. I want it to work just by one

Any suggestions


Thank you guys

Recommended Answers

All 3 Replies

If lstInvisibleTv.Items.Count = lstInvisiblePc.Items.Count +1 Then

:)

thank you

If thread=solved Then mark as Solved AndAlso Return "Thanks" & :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.