I have written some code to "Deselect All Items in Listbox on a form".
Why is it not working, see attached code.
The Error Message is:
"Run-time error '438': Object doesn't support this property or method"
Public Sub ListboxDeselectAllItems(TheListBox As Object)
Dim TheItems As Variant
If TheListBox.MultiSelect = 0 Then
TheListBox = Null
For Each TheItems In TheListBox.ItemsSelected
TheListBox.Selected(TheItems) = False