Multiselect listbox non-bound columns

  • Thread starter Thread starter Jim Pockmire
  • Start date Start date
By number, starting from 0, NOT 1. Hence you would refer to a field as .
Column(X, intCurrentRow), where X is the column number, and intCurrentRow is
the number of the row of the selected item within the list box.

Hope this helps,

Sam
 
But, whatc ode would I use to reference just the "ItemsSelected" collection
and not entire list box collection (that's where I'm stuck).
 
Jim,

Look in the help file for the Selection property. MS gives you all the code
you need.

Sam

Jim said:
But, whatc ode would I use to reference just the "ItemsSelected" collection
and not entire list box collection (that's where I'm stuck).
By number, starting from 0, NOT 1. Hence you would refer to a field as .
Column(X, intCurrentRow), where X is the column number, and intCurrentRow
[quoted text clipped - 6 lines]
 
Dim strSelected As String
Dim varSelected As Variant

For Each varSelected In Me.MyListBox.ItemsSelected
strSelected = strSelected & _
Me.MyListBox.Column(1, varSelected) & vbCrLf
Next varSelected

MsgBox "The 2nd column of all of the selected items is: " & vbCrLf & _
strSelected
 
Oops, I meant the Selected property.

Sorry,

Sam
Jim,

Look in the help file for the Selection property. MS gives you all the code
you need.

Sam
But, whatc ode would I use to reference just the "ItemsSelected" collection
and not entire list box collection (that's where I'm stuck).
[quoted text clipped - 4 lines]
 
Back
Top