Scroll listbox to the top - no selected records

brharrii

Registered User.
Local time
Today, 11:25
Joined
May 15, 2012
Messages
272
I'm using the following code to clear selected records from a listbox after a button is pressed:

Code:
        For i = 0 To lstProducts.ListCount - 1
        lstProducts.Selected(i) = False
    Next

The code works great except that it leaves the listbox scrolled all the way to the bottom. What is the best way to scroll back up to the top of the listbox without selecting another record?

Thanks!
 
What happens if you start deselecting from the last row in the list box?
 
Hi cronk, thanks for the suggestion, I'm not sure how to do that though?
 
Um,
For i = lstProducts.ListCount - 1 to 0
 

Users who are viewing this thread

Back
Top Bottom