Multiple Selection (1 Viewer)

John liem

Registered User.
Local time
Today, 05:59
Joined
Jul 15, 2002
Messages
112
I have found an example of database which I can use in my application, but what I want to know is how I can de-select my selections.
In this example, I am using the "Form3" example and want to de-select the selected items in "List10" after the button "Add items" has been pushed. Thanks.
 

Attachments

  • Example.zip
    29.5 KB · Views: 117
Last edited:

ghudson

Registered User.
Local time
Yesterday, 23:59
Joined
Jun 8, 2002
Messages
6,194
Code:
Private Sub bDeselectAll_Click()
    
    Dim i As Integer
    Dim intListCount As Integer
        
    intListCount = YourListBoxNameHere.ListCount - 1
        
    For i = 0 To intListCount
    YourListBoxNameHere.Selected(i) = False
    Next
    
End Sub
Code:
Private Sub bSelectAll_Click()

    Dim i As Integer
    Dim intListCount As Integer
    
    intListCount = YourListBoxNameHere.ListCount - 1
    
    For i = 0 To intListCount
    YourListBoxNameHere.Selected(i) = True
    Next

End Sub
 

John liem

Registered User.
Local time
Today, 05:59
Joined
Jul 15, 2002
Messages
112
Thanks GHudson, it works as I want, great help!!!
 

Users who are viewing this thread

Top Bottom