This seemingly simple piece of code is giving the 'run time error 424 object required' error. How do you pass an activeX listbox as a parameter to a module?
I've tried ByVal, ByRef, neither, and MsForms.ListBox.
Thanks for any help.
Code:
Public Sub btnAddToListbox_Click()
listboxSystemSelection.AddItem "item added"
DisplayItemsInListbox (listboxSystemSelection) ' crashes here
End Sub
Code:
Public Sub DisplayItemsInListbox(ByRef thelistbox As ListBox)
thelistbox.AddItem ("added this")
End Sub
I've tried ByVal, ByRef, neither, and MsForms.ListBox.
Thanks for any help.