RESOLVED - Return a String of Selected Items in Listbox
I have a listbox that is populated with years.
2001 <-Selected
2002 <-Selected
2003
2004 <-Selected
2005
I want to return a string based upon the selections made.
Example: 2001,2002,2004
Code:
Dim z As Integer
Dim Ystr as String
For z = 0 To (lstForecastYears.ListCount - 1)
If lstForecastYears.Selected(z) = True Then
Ystr = lstForecastYears.List(z)
End If
Msgbox Ystr
Next
I'm returning the correct selections but how do I get into a string format with the delimiters?
Thanks.