|
-
Nov 6th, 2005, 02:32 AM
#1
Thread Starter
New Member
[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
-
Nov 6th, 2005, 02:40 AM
#2
Fanatic Member
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.
-
Nov 6th, 2005, 02:43 AM
#3
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.
-
Nov 6th, 2005, 03:09 AM
#4
Thread Starter
New Member
Re: Call a subroutine from one form to another?
-
Nov 6th, 2005, 12:59 PM
#5
Fanatic Member
Re: [RESOLVED] Call a subroutine from one form to another?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|