Need help in Lsitbox control--381 invalid array index valy property error

Hi all i need urgent help from all u experts here...
I am displaying records in my listbox control from my person_Master...
While excuting my project runs properly but after some time it gives error invalid array index property ..it is due to inserting records more than 32768...but i hve to show more than this records in my listbox so what i hve to do to avoid this error and insert all record in my listbox control.....
Need it urgently... I hope i will get solutions from u experts...
mail me on chetan4code@gmail.com...below i am giving my code which i hve done in my project....
Private Sub opt_SelSubBroker_Click()
Dim SubBroker_Rec As New ADODB.Recordset
On Error GoTo ErrorDoor

If SubBroker_Rec.State = 1 Then SubBroker_Rec.Close

SubBroker_Rec.Open "Select Person_Name,Person_Id from " & DBSICMstNM & ".Person_Master where Is_Agent = 1 ", gCnn_DbSICMstHo, adOpenStatic, adLockReadOnly, adCmdText
If Not (SubBroker_Rec.EOF And SubBroker_Rec.BOF) Then
SubBroker_Rec.MoveFirst
lst_SelSubBroker.Enabled = True
lst_SelSubBroker.BackColor = &H80000005
Do Until SubBroker_Rec.EOF
lst_SelSubBroker.AddItem (SubBroker_Rec.Fields("Person_Name"))
lst_SelSubBroker.ItemData(lst_SelSubBroker.NewIndex) = SubBroker_Rec.Fields("Person_Id") 'here in this line it fires the error
SubBroker_Rec.MoveNext
Loop
End If
Exit Sub
Resume
ErrorDoor:

MsgBox Err & " " & Error$

End Sub
[1534 byte] By [chetan4code] at [2007-11-20 11:03:27]
# 1 Re: Need help in Lsitbox control--381 invalid array index valy property error
There is no reason for a user to look at more than 10 or so records to make a choice. Who is going to scroll thru 30000 names? That may or may not be the reason that there's a limit of listitem's.

You could use a flexgrid, but, I'd rethink how many records you need.

And, don't put your email address on a public forum, as they're scanned by bots daily. You'll be spammed by Saturday.
dglienna at 2007-11-9 19:33:59 >
# 2 Re: Need help in Lsitbox control--381 invalid array index valy property error
My choice would be a ListView control. Add Microsoft Windows Common Controls 6.0 to your toolbox and try out a ListView.
It offers much more comfortable display possibilities (even in columns). It is a little more complex than the ListBox control and requires a different syntax for adding items.
ListView.ListItems.Add [Index], [Key], [Text]...
But there is virtually no limit to the number of items, as far as I tried.
(Surely there is a limit whith the index of elements, possibly being the maximum positive Long value)
WoF at 2007-11-9 19:34:59 >