What I am trying to do is I am trying to be able to have a control supplied to a sub which then makes changes to the control
At the moment I have something like this
What I am struggling with is that I am trying to supply the ListBox as a parameter like this
And this is coming up with the following error
Object required
I was wondering whether anyone knows how I should be supplying the control as a parameter.
Any Ideas?
Thanks
At the moment I have something like this
Code:
Public Sub updateListBox(ByVal lstbox As ListBox)
'Stuff to lstbox is carried out here
End Sub
What I am struggling with is that I am trying to supply the ListBox as a parameter like this
Code:
updateListBox(me.List1)
And this is coming up with the following error
Code:
Run-time error '424':
Object required
I was wondering whether anyone knows how I should be supplying the control as a parameter.
Any Ideas?
Thanks