[RESOLVED] Call a subroutine from one form to another?
I have a simple question. How do I call a subroutine on another form. Example: I have a project with two forms. From a procedure in form1, I would like to call a subroutine in form2
Please forgive my ignorance... I'm teaching myself how to program and have had no formal training.
Thanks.
Sincerely,
J
Re: Call a subroutine from one form to another?
It's very simple, just use Form2.whatever, where Form2 contains a subroutine called whatever, just remember that the subroutine must be declared as public.
Re: Call a subroutine from one form to another?
It would be better style to add a code module to your project and add the procedure there and call it from both forms. Note that procedures in codes modules are Public by default.
Re: Call a subroutine from one form to another?
Re: [RESOLVED] Call a subroutine from one form to another?