bs51746
May 26th, 2004, 10:36 AM
I have a form in XLS (2002) that has a listbox. In form_intialize () event 10 dates fill the list box (today +1 through 10).
User will select 4 dates, i am trying to store all 4 values selected in variables.
I know that it recognizes only the last selected but was hoping for a work around.
I have the selected being shown in Msgbox and then stored in myVariable, but when loops, overwrites last variable stored.
this is what i have:
Dim x As Integer
For x = 0 To lstDates.ListCount - 1
If lstDates.Selected(x) = True Then
MsgBox lstDates.List(x)
myVariable = lstDates.List(x)
End If
Next x
:rolleyes:
User will select 4 dates, i am trying to store all 4 values selected in variables.
I know that it recognizes only the last selected but was hoping for a work around.
I have the selected being shown in Msgbox and then stored in myVariable, but when loops, overwrites last variable stored.
this is what i have:
Dim x As Integer
For x = 0 To lstDates.ListCount - 1
If lstDates.Selected(x) = True Then
MsgBox lstDates.List(x)
myVariable = lstDates.List(x)
End If
Next x
:rolleyes: