Hi,
I'm an absolute VBA novice and am stuck with some code that I've been give to output multi listbox selections into a single cell. I've searched for an age to find an explanation I can understand but failed miserably - please help me retain my sanity
Everything works well until the file is saved, on re-opening the check boxes in the list box have lost the selections (the output cell retains the original selections).
If someone could post back corrected code I would be your new bff, the code I'm using is as follows:
Private Sub ListBox1_Change()
'Output Cell
OutCell = "A1"
Dim outString As String, i As Long
outString = vbNullString
First = 0
With ListBox1
For i = 0 To .ListCount - 1
If .Selected(i) Then
If First = 0 Then
outString = .List(i)
First = 1
Else
outString = outString & ", " & .List(i)
End If
End If
Next i
End With
Range(OutCell).Value = outString
End Sub
I'm an absolute VBA novice and am stuck with some code that I've been give to output multi listbox selections into a single cell. I've searched for an age to find an explanation I can understand but failed miserably - please help me retain my sanity

Everything works well until the file is saved, on re-opening the check boxes in the list box have lost the selections (the output cell retains the original selections).
If someone could post back corrected code I would be your new bff, the code I'm using is as follows:
Private Sub ListBox1_Change()
'Output Cell
OutCell = "A1"
Dim outString As String, i As Long
outString = vbNullString
First = 0
With ListBox1
For i = 0 To .ListCount - 1
If .Selected(i) Then
If First = 0 Then
outString = .List(i)
First = 1
Else
outString = outString & ", " & .List(i)
End If
End If
Next i
End With
Range(OutCell).Value = outString
End Sub