[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
Re: Run Sub created in Form1 from Form2
You could put the subroutine in a module.
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.