R
Roger Collette
Hello;
I have a list box ; I use the below code to select all, or clear all similar
code . It works fine so far, but when I have a list returning 13000 records.
It hangs. Any ideas. Thanks in advance.
Roger
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Private Sub cmdSelectIssue_Click()
On Error GoTo Err_cmdSelectIssue_Click
Dim iInstr As Integer
'This is the "Select All" command button
'It scrolls through every item in the list and sets selected to true or
Highlights all records in List
For iInstr = 0 To lstInstrIssue.ListCount - 1
lstInstrIssue.Selected(iInstr) = True ' If Iset this to False it
de-select the items.
Next iInstr ************** when I debug, it is stuck here at this line
Exit_cmdSelectIssue_Click:
Exit Sub
Err_cmdSelectIssue_Click:
MsgBox Err.Description
Resume Exit_cmdSelectIssue_Click
End Sub
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
I have a list box ; I use the below code to select all, or clear all similar
code . It works fine so far, but when I have a list returning 13000 records.
It hangs. Any ideas. Thanks in advance.
Roger
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Private Sub cmdSelectIssue_Click()
On Error GoTo Err_cmdSelectIssue_Click
Dim iInstr As Integer
'This is the "Select All" command button
'It scrolls through every item in the list and sets selected to true or
Highlights all records in List
For iInstr = 0 To lstInstrIssue.ListCount - 1
lstInstrIssue.Selected(iInstr) = True ' If Iset this to False it
de-select the items.
Next iInstr ************** when I debug, it is stuck here at this line
Exit_cmdSelectIssue_Click:
Exit Sub
Err_cmdSelectIssue_Click:
MsgBox Err.Description
Resume Exit_cmdSelectIssue_Click
End Sub
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++