KeithIT
Registered User.
- Local time
- Today, 18:06
- Joined
- Dec 20, 2004
- Messages
- 133
Anyone know why, when I run this code, it will only create a string of a limited number of email addresses? Anytime I select more than five items in my list box and ask it to create the string and pass the variable to my procedure (see end of code snipet) it only gives me the username part of the first email address and nothing else, but when I select five or fewer it puts the full email addresses in separated by a comma (as the code tells it to). I can't find a limiting variable anywhere in my code but perhaps I'm looking past something?
Any help would be greately appreciated. Thanx!
Code:
Dim strList As String
Dim varItem As Variant
' Request to edit items selected in the list box
' If no items selected, then nothing to do
If Me!lboNameList.ItemsSelected.Count = 0 Then Exit Sub
' Loop through the items selected collection
For Each varItem In Me.lboNameList.ItemsSelected
'Grab the email column (second column) for each selected item
strList = strList & "," & Me.lboNameList.Column(1, varItem)
Next varItem
strList = Mid(strList, 2)
CreateMailandAttachFileAdr (strList)
Any help would be greately appreciated. Thanx!