Listbox - Return to top without selecting (1 Viewer)

BrotherBook

Registered User.
Local time
Today, 12:42
Joined
Jan 22, 2013
Messages
43
I'm trying to create some VBA that will loop through my listbox, de-select all of the items, and then return to the top of the list without selecting the first item. Below is the code I am using based on what i was able to find through google, but the top item still remains selected.
Code:
        With Me.AvailableAttendees
            For SelRow = 0 To .ListCount - 1
                .Selected(SelRow) = False
            Next SelRow
        End With

         Me.AvailableAttendees.SetFocus
         Me.AvailableAttendees.ListIndex = 0

Thanks,
Mike
 

JHB

Have been here a while
Local time
Today, 18:42
Joined
Jun 17, 2012
Messages
7,732
I think the listbox property Multi Select is set to "Extended", try changing it to "Simple".
 

BrotherBook

Registered User.
Local time
Today, 12:42
Joined
Jan 22, 2013
Messages
43
The multi select property is set to Simple and I still get this issue. Any other ideas?
 

BrotherBook

Registered User.
Local time
Today, 12:42
Joined
Jan 22, 2013
Messages
43
I figured it out. Once the ListIndex has been set, i set the ListBox = 0
 

Users who are viewing this thread

Top Bottom