Hi
I have a listbox "ReportListBox" and the ReportListBox.ListIndex is tyoe Variant/Long
I have set up a variable rng with dim as Variant and also have tried Long.
I then use rng = Range("filteropenissues").Rows.Count.
When I try to process the code line ReportListBox.ListIndex = rng I get a 380 Error "Could Not set the listindex property."
The value of ReportListBox.ListIndex at this point is 1 and rng is 59 (either in Variant or Long)
If I replace rng with CurrentRecordID (Long) with a value of 2 I don't get an error.
Can anyone explain why this is happening
Thanks
Ernie
I have a listbox "ReportListBox" and the ReportListBox.ListIndex is tyoe Variant/Long
I have set up a variable rng with dim as Variant and also have tried Long.
I then use rng = Range("filteropenissues").Rows.Count.
When I try to process the code line ReportListBox.ListIndex = rng I get a 380 Error "Could Not set the listindex property."
The value of ReportListBox.ListIndex at this point is 1 and rng is 59 (either in Variant or Long)
If I replace rng with CurrentRecordID (Long) with a value of 2 I don't get an error.
Can anyone explain why this is happening
Thanks
Ernie
Last edited: