Multiselect listbox non-bound columns

O

OfficeDev18 via AccessMonster.com

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
 
J

Jim Pockmire

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

OfficeDev18 via AccessMonster.com

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]
 
D

Douglas J. Steele

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
 
O

OfficeDev18 via AccessMonster.com

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]
 
Top