I use the following code to build a string from items selected in a listbox by the user:
__________________________________________________ _______
Private Sub SendEmail_Click()
Dim varItem As Variant
Dim strTO As String
For Each varItem In Me.lstTO.ItemsSelected
strTO = strTO & ",'" & Me.lstTO.ItemData(varItem) _
& "'"
Next varItem
End Sub
__________________________________________________ _______
I would like however, to avoid having the user select the items but rather, build the string automatically from the table or at least have the code use all the items in the listbox, which are the same items in the table since I'm populating the listbox from the table. Any ideas?