Question : Listbox

Hi,

How can i recognize the last selected item in a milti selected listbox.

Tx

Answer : Listbox

Dim j As Integer
Dim intLastSelected As Integer

For j = 0 To ListBoxName.ListCount - 1
   If ListBoxName.Selected (j) Then intLastSelected = j
Next j

'intLastSelected will now have the index of the last selected item.
'To get the column content of that item:
ListBoxName.Column (, intLastSelected )
Where the fist column is ColumnNumber 0
Random Solutions  
 
programming4us programming4us