I am trying to pass a control to a subroutine.
I have specified that a control is to be passed into
the method:
sub foo(ctrl as control)
.
.
.
end sub
Then:
call foo(some_control_name)
However whenever I pass a control into the method
it passes the value of the control into the method
and not the control itself. I believe VB passes by
reference but even adding byref to this does not work.
What is happening could be described in code as follows:
call foo(some_control_name.value)
but what I want is the control itself:
call foo(some_control_name)
Any suggestions?
Thanks.
I have specified that a control is to be passed into
the method:
sub foo(ctrl as control)
.
.
.
end sub
Then:
call foo(some_control_name)
However whenever I pass a control into the method
it passes the value of the control into the method
and not the control itself. I believe VB passes by
reference but even adding byref to this does not work.
What is happening could be described in code as follows:
call foo(some_control_name.value)
but what I want is the control itself:
call foo(some_control_name)
Any suggestions?
Thanks.