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
I'm returning the correct selections but how do I get into a string format with the delimiters?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
Thanks.




Reply With Quote