Extract selected items from a combobox?

joe789

Registered User.
Local time
Today, 23:10
Joined
Mar 22, 2001
Messages
154
Hi Folks,

I have a unbound combobox on a form that displays about 150 items loaded via a table that is bound to it. I am trying to determine how to be able to essentially extract any item(s) that have been highlighted/selected and create a string, so to speak, with a comma delimiter between each item that I can then place into a memo field once a command button is pressed.

Would anyone be able to help me figure out how to go about doing this, I would really appreciate it. I wouldn't even know what command to use to read thru the combobox selected items to extract them ... I tried a few different ones but nothing seems to work yet.

Thank you very much,

Joe
 
If you are referring to a listbox, then you could do something like this:
Code:
Dim varItem As Variant
Dim csvList As String

For Each varItem In lstBox.ItemsSelected
                csvList= csvList & ", " & lstbox.Column(0, varItem)
Next varItem
csvList=mid(csvList, 3)
 

Users who are viewing this thread

Back
Top Bottom