So I searched the forum here and found a bit of code from one of the members here that seems to help me get the items selected in my list box to my results sheet in excel. The only issue I'm now having is getting those selected items into the correct column on my sheet.
Any help would be greatly appreciated, below is the code I found here with my naming convention applied, I've also ignored one part of the code as it clear contents I need there.
I want to be able to get the code into column I2 & below if multiple selections are made.
Any help would be greatly appreciated, below is the code I found here with my naming convention applied, I've also ignored one part of the code as it clear contents I need there.
I want to be able to get the code into column I2 & below if multiple selections are made.
Code:
i = i - 1
With lstbxLoggingServiceType
For x = 0 To .ListCount - 1
If .Selected(x) Then
i = i + 1
ReDim Preserve varSelected(i)
varSelected(i) = .List(x)
End If
Next x
End With
If i = -1 Then Exit Sub
'Range("I:I").ClearContents
Range(Cells(1, 2), Cells(UBound(varSelected) + 1, 2)) = _
WorksheetFunction.Transpose(varSelected)