It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

list box question

Moderator: dafunkymunky

list box question

Postby pfm200586 on Fri Oct 21, 2011 6:35 pm

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:

Code: Select all
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
pfm200586
 
Posts: 3
Joined: Thu Sep 08, 2011 1:17 pm

Re: list box question

Postby sanjon on Fri Oct 21, 2011 7:13 pm

Very easy. Here is the code:

Code: Select all
If lstInvisibleTv.Items.Count = lstInvisiblePc.Items.Count + 1 Then
sanjon
 
Posts: 40
Joined: Sun Dec 05, 2010 6:20 pm


Who is online

Users browsing this forum: No registered users and 2 guests