Passing a control to a module
Hi All,
Just a quick question.
I have a module which I wish to pass the name of a control to so that it can influence that control. How would I go about doing this?
What I have at the moment is
::Form::
Private Sub Command2_Click()
`ButtonChange is the module
`test is the function
ButtonChange.test (Form2.Command2)
End Sub
::Module::
Public Function test(cbutton)
cbutton.caption = "test"
End Function
So basically what I want it to do is to change the caption of form2.command2 to "test".
I get the error message of "object required" but it is not making any sense to me.
Thanks,
Gavin
:eek: :cool: :eek: :confused: