N
neilmber
How can the concatenation operator be included within strings? I have a
function that concatenates the selected values from a listbox but would like
to add " & "*" Or " to each value:
Public Function ConcatList(frmWhichForm, varWhichControl)
Dim varItem As Variant
Dim stParameter As String
Dim WhichForm As Form
Dim WhichCntl As Control
Set WhichForm = frmWhichForm
Set WhichCntl = varWhichControl
stParameter = ""
For Each varItem In WhichCntl.ItemsSelected
stParameter = stParameter & WhichCntl.ItemData(varItem) & "
______________ "
Next varItem
If Len(stParameter) > "" Then
stParameter = Left$(stParameter, Len(stParameter) - 4)
End If
ConcatList = stParameter
End Function
Thanks.
function that concatenates the selected values from a listbox but would like
to add " & "*" Or " to each value:
Public Function ConcatList(frmWhichForm, varWhichControl)
Dim varItem As Variant
Dim stParameter As String
Dim WhichForm As Form
Dim WhichCntl As Control
Set WhichForm = frmWhichForm
Set WhichCntl = varWhichControl
stParameter = ""
For Each varItem In WhichCntl.ItemsSelected
stParameter = stParameter & WhichCntl.ItemData(varItem) & "
______________ "
Next varItem
If Len(stParameter) > "" Then
stParameter = Left$(stParameter, Len(stParameter) - 4)
End If
ConcatList = stParameter
End Function
Thanks.