I can pass a form to a function, but i cant pass a control - it seems to pass its default properly (ie .text).
Any ideas for how i do this?
Thanks,
alex.
Printable View
I can pass a form to a function, but i cant pass a control - it seems to pass its default properly (ie .text).
Any ideas for how i do this?
Thanks,
alex.
Try defining the input of the sub/function as control.
I assume you know the type of control that you want to pass, so you should code the receiving subroutine to expect the specific type of control you are passing to it. For example if you want to pass a TextBox, the receiving subroutine should be defined something like:
Public Sub MySubroutine(MyTextBox As TextBox)