ajay_gajree
Well-known Member
- Joined
- Jul 16, 2011
- Messages
- 518
Code:
Private Sub UserForm_Initialize()
Dim rCell As Range
Dim rRng As Range
Set rRng = shtList.Range("tbl1[Heading 1]")
For Each rCell In rRng.Cells
lboList.AddItem rCell.Value
Next rCell
End Sub
Private Sub cmdList_Click()
Dim lItem As Long
Dim YourValue As String
For lItem = 0 To lboEmails.ListCount - 1
YourValue = lboEmails.Value
'USE YOUR VALUE IN SOME WAY
Next
Unload Me
End Sub
Hi All
I have a Userform with a List Box that allows Multiple Selections, this work fine loading values into it from a range in my workbook.
My issue is, how to I assign a selected value to to a variable in the code so I can use it in some way and then loop to use the next selected value?
Can't work this out! Help!
Hope that is clear!