Hi good people!,
I have a multi-select listbox. This box is on a worksheet. Only the items appear in the listbox, there are no tickboxes next to them. if I select an item, a blue line goes through it. Every selection I make is transferred to the same sheet to column F. I am struggling to get my macro button to clear the blue lines (deselect the items). These are the codes I currently have:
ListBox3 code:
Dim i As Integer, c As Long
With ActiveSheet.Shapes("ListBox3").OLEFormat.Object
For i = 1 To .ListCount
If .Selected(i) Then
c = c + 1
Cells(c, "F") = .List(i)
End If
Next i
End With
and macro button code:
Sub ClearSelections()
'
' ClearSelections Macro
'
'
ActiveSheet.Shapes.Range(Array("Rounded Rectangle 1")).Select
Range("F1:F16").Select
Selection.ClearContents
With Sheet1
.ListBox3.Clear
End With
Range("F1").Select
End Sub
I get "method or datamember not found.". This part is yellow:
HTML Code:
Sub ClearSelections()
and this part is blue:
.
would someone please be so kind and help me with this...I am not very clued up when it comes to coding. Thank you all very much..