J
Jim Aksel
I have a Windows Form created in VBA within Project. The form contains
ListBox1.
I am trying to read the value of the selected items.
Basically
For i=0 to ListBox1.ListCount-1
if ListBox1.Selected(i) then
I want to know the text of what the list box contains for the selected item
end if
Next i
I see no method or property in the Object Browser that tells me what the
value of the text is in the list box for the selected index.
Seems like there is a better way to to this with a For Each.
The list box is is a multi value select, so the user can select multiple
items. I just want to knock the selected ones off one at a time and then go
do something.
To do that, I need to know the text of what I had when I loaded the list box:
With ListBox1
..AddItem("Text1")
..AddItem(Text2")
.... there are 30 of these as you might suspect....
End With
I will use this with the GetField and SetField functions.
TIA
Jim
ListBox1.
I am trying to read the value of the selected items.
Basically
For i=0 to ListBox1.ListCount-1
if ListBox1.Selected(i) then
I want to know the text of what the list box contains for the selected item
end if
Next i
I see no method or property in the Object Browser that tells me what the
value of the text is in the list box for the selected index.
Seems like there is a better way to to this with a For Each.
The list box is is a multi value select, so the user can select multiple
items. I just want to knock the selected ones off one at a time and then go
do something.
To do that, I need to know the text of what I had when I loaded the list box:
With ListBox1
..AddItem("Text1")
..AddItem(Text2")
.... there are 30 of these as you might suspect....
End With
I will use this with the GetField and SetField functions.
TIA
Jim