I am trying to get all the contacts from global address and normal contact list in a list box in this format: lastname,firstname
all the names are displayed in a listbox.
User will select any of these names and say add.
All the email address of the seleted names should be displayed in a textbox.
Code:If objform.lstContactList.SelCount > 0 Then 'For each item in List1... For i = objform.lstContactList.ListCount - 1 To 0 Step -1 ' if it's selected then.. If objform.lstContactList.Selected(i) Then '..store it in the array sUserChoices(z) = objform.lstContactList.List(i) ' it contain john,n 'For sUserChoices = 0 To SelCount - 1 Txtname.Text = Txtname.Text & sUserChoices(z) & "; " 'here its adding that name to textbox, but i want the email address to be in the textbox z = z + 1 End If Next End If




Reply With Quote