By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,392 Members | 1,507 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,392 IT Pros & Developers. It's quick & easy.

Multi Select List Box options to text boxes

P: n/a
I was wondering if anyone had a code example for sending the
multi-selected choices in a list box to a test box
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Private Sub Command2_Click()
Dim strTemp As String, varItem As Variant
For Each varItem In Me.List0.ItemsSelected
strTemp = strTemp & ";" & Me.List0.ItemData(varItem)
Next
strTemp = Right(strTemp, Len(strTemp) - 1)
Debug.Print strTemp
End Sub

This will loop through the selected items in listbox List0, add their values
to the variable strTemp divided by semicolons then removes the leading
semicolon and prints the results to the debug window.

--
Wayne Morgan
Microsoft Access MVP
"Kenneth Grice" <ke**********@yahoo.com> wrote in message
news:e2*************************@posting.google.co m...
I was wondering if anyone had a code example for sending the
multi-selected choices in a list box to a test box

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.