Note that there are some explanatory texts on larger screens.

plurals
  1. POListbox owerflow problem when list-items are numbers
    text
    copied!<p>listbox always overflows which has more than thousands of items, i need a way to get rid of this.. I need to use an alternate object which can act as listbox!</p> <pre><code>Private Sub difference_Click() 'Find differences and show' j = 0 For i = 0 To secretlist1.ListCount - 1 'If i use 2nd "for" with J it would cause to get same items again and again! 'for that reason im not gonna do that instead im using a definition for j as long 'but it keeps overflow problem so icant use it either. If Val(secretlist2.List(i)) &lt;&gt; Val(secretlist1.List(j)) Then lostonelist.Visible = True 'show the lostonelist lostonelist.AddItem secretlist1.List(j) 'add the items which are not in list2 i = i - 1 'if they r not equal to each other move list2 index to previous one End If j = j + 1 'we moved list2 index to previous cause list1 index always will be increasing 'and when they r not equal to eachother we must make sure that next item in list1 'will be compared with the same item in list2 Next End Sub </code></pre> <p>OR an easier way to do it with Do While:</p> <pre><code>Private Sub difference_Click() 'Find differences and show' j = 0 i = 0 'For i = 0 To secretlist1.ListCount - 1 Do While Not secretlist1.ListCount - 1 If Val(secretlist2.List(i)) &lt;&gt; Val(secretlist1.List(j)) Then lostonelist.Visible = True lostonelist.AddItem secretlist1.List(j) i = i - 1 End If j = j + 1 i = i + 1 Loop End Sub </code></pre> <p>What i am trying is searching the items that is not in secretlist2 while they remains in secretlist1.. Also in these listboxes all my items are numbers no string in any of them.. But "secretlist1(j)" always overflows i need a way to get rid of this.. and i have thousans of list items. i need another object which i can use as listbox, im still searching for a solution i think this is a good example and when i found an answer to it before u can find.. ill post it here. Ty already. </p> <p>Important Note: This is a Visualbasic 6 project not a .NET project!</p> <p>i was making this example for teaching my little brother how to! but i overflow my self while doing it "facepalm" xD</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload