Hi,
I am using an Active X List Box.... Its not holding its selection & every time i have to make a selection when the list drops down. For example i select item 1 & 2 from the drop down list. then when i again go to the drop down list - the selection is not there. its not holding its selection.
here is the code:
Any Idea ??
I am using an Active X List Box.... Its not holding its selection & every time i have to make a selection when the list drops down. For example i select item 1 & 2 from the drop down list. then when i again go to the drop down list - the selection is not there. its not holding its selection.
here is the code:
Code:
Sub Customers()
Dim xSelShp As Shape, xSelLst As Variant, I As Integer
Set xSelShp = ActiveSheet.Shapes(Application.Caller)
Set xLstBox = ActiveSheet.ListBox4
If xLstBox.Visible = False Then
xLstBox.Visible = True
xSelShp.TextFrame2.TextRange.Characters.Text = "Pickup Customers"
Else
xLstBox.Visible = False
xSelShp.TextFrame2.TextRange.Characters.Text = "Select Customers"
For I = xLstBox.ListCount - 1 To 0 Step -1
If xLstBox.Selected(I) = True Then
xSelLst = xLstBox.List(I) & ", " & xSelLst
End If
Next I
If xSelLst <> "" Then
Range("ListBoxOutput4") = Mid(xSelLst, 1, Len(xSelLst) - 2)
Else
Range("ListBoxOutput4") = ""
End If
End If
End Sub
Any Idea ??