P
Pamela
I have a text box that takes the entries from a multi-select list box and
concatenates them. My code is not reading that there is supposed to be a
comma and space between each of the selected items from my list box. My code
currently lists them correctly but all together but running into each other
with no spaces. I believe the problem lies in line 5 where "strText" is. We
tried setting it to varRow but that just lists the # of items selected. Here
is my code:
Dim varRow As Variant, strText As String
'strText = vbNullString
For Each varRow In Me.lbDamagedParts.ItemsSelected
strText = strText & Me.lbDamagedParts.Column(0, varRow)
Me.Text39 = "The vehicle sustained damage to the " & strText & ", "
Next varRow
Me.Text39 = Left(Me.Text39, Len(Me.Text39) - 1) & "."
Thank you so much!
Pamela
concatenates them. My code is not reading that there is supposed to be a
comma and space between each of the selected items from my list box. My code
currently lists them correctly but all together but running into each other
with no spaces. I believe the problem lies in line 5 where "strText" is. We
tried setting it to varRow but that just lists the # of items selected. Here
is my code:
Dim varRow As Variant, strText As String
'strText = vbNullString
For Each varRow In Me.lbDamagedParts.ItemsSelected
strText = strText & Me.lbDamagedParts.Column(0, varRow)
Me.Text39 = "The vehicle sustained damage to the " & strText & ", "
Next varRow
Me.Text39 = Left(Me.Text39, Len(Me.Text39) - 1) & "."
Thank you so much!
Pamela