|
-
Mar 17th, 2009, 08:50 AM
#1
Thread Starter
Junior Member
[RESOLVED] Run Sub created in Form1 from Form2
I am in the process of creating an excel add-in.
I have created a subroutine inside one form. Using a second form, I would like to run the subrountine if the "OK" button is clicked.
How do I make this public subroutine availiable between forms?
Sorry if this is a stupid question. I am new at this and I have been given this project with very little instruction. Trial by fire.
Thanks,
snjdev
-
Mar 17th, 2009, 08:54 AM
#2
Addicted Member
Re: Run Sub created in Form1 from Form2
You could put the subroutine in a module.
-
Mar 17th, 2009, 10:05 AM
#3
Re: Run Sub created in Form1 from Form2
If the routine is declared public, and the instance of the form with the routine is within scope of the form that calls the routine (that's a BIG if), then the call would be:
<instance of form>.<method name>
as would be the case for any other public member of any other class. Forms are just classes.
My usual boring signature: Nothing
 
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
|