I have a mulit-select listbox in which You can select more than one item which is stored in a textbox. Is there a way I can store the text without the guot marks (")? Here is the code:
Dim VarItem As Variant
Dim pillarlist As String 'string to store product type selected list
Dim lst4 As ListBox 'create object of product type listbox
Dim counter As Variant
Set lst4 = Me.lstPillars
counter = 1
For Each VarItem In lst4.ItemsSelected
If counter = 1 Then
pillarlist = """" & lst4.ItemData(VarItem) & """"
Else
pillarlist = pillarlist & ", " & """" & lst4.ItemData(VarItem) & """"
End If
counter = counter + 1
Me.Text113 = pillarlist
Next VarItem
Dim VarItem As Variant
Dim pillarlist As String 'string to store product type selected list
Dim lst4 As ListBox 'create object of product type listbox
Dim counter As Variant
Set lst4 = Me.lstPillars
counter = 1
For Each VarItem In lst4.ItemsSelected
If counter = 1 Then
pillarlist = """" & lst4.ItemData(VarItem) & """"
Else
pillarlist = pillarlist & ", " & """" & lst4.ItemData(VarItem) & """"
End If
counter = counter + 1
Me.Text113 = pillarlist
Next VarItem