hi,
Code:
Dim x As Integer
Private Sub ListBox1_Change()
Dim i As Integer, n As Integer
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) = True Then n = n + 1
Next i
If n x Then
x = x + 1
MsgBox "select"
Else
x = x - 1
MsgBox "deselect"
End If
End Sub
--
isabelle
Le 2011-04-23 05:02, kalle a écrit :
Good day Group,
Need some guidance how to determine if the click on a multi listbox
is
a selection or a deselection. I am building an array by the
multi listbox like (in listbox change event):
arJoin(UBound(arJoin)) = Me.ListBox1.Column(1, Me.ListBox1.ListIndex)
If the click is a selection then OK but if it is a deselection I need
to know and
take care of that in some way.
Grateful for some hints.
Brgds
CG Rosén