Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to jump from a Form procedure to a Workbook or Module procedure?
I have a procedure in a user form and I need to have it execute a procedure in a
worksheet module (same workbook). Basically I need to "Call mySubroutine()" from a form to an outside subroutine. How do you do that? Even a "GoTo xxx" would be fine. I looked at Chip P's site and using his "Programming To The Visual Basic Editor" (http://www.cpearson.com/excel/vbe.htm) I can programmatically find the procedure in the correct module and what line it begins on... if it even matters. Thanks, Toby Erkson -- Portland, Oregon -- http://www.bidata.net/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to jump from a Form procedure to a Workbook or Module procedure?
just like you did............ only without the parentheses.
code blah blah blah Call mySubroutine code blah blah blah make sure the sub for mySubroutine is a PUBLIC sub. susan On Jan 25, 1:46 pm, "T. Erkson" wrote: I have a procedure in a user form and I need to have it execute a procedure in a worksheet module (same workbook). Basically I need to "Call mySubroutine()" from a form to an outside subroutine. How do you do that? Even a "GoTo xxx" would be fine. I looked at Chip P's site and using his "Programming To The Visual Basic Editor" (http://www.cpearson.com/excel/vbe.htm) I can programmatically find the procedure in the correct module and what line it begins on... if it even matters. Thanks, Toby Erkson -- Portland, Oregon -- http://www.bidata.net/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to jump from a Form procedure to a Workbook or Module procedur
Have you tried being more explicit in your reference???
Call Module1.mySubroutine() -- HTH... Jim Thomlinson "T. Erkson" wrote: I have a procedure in a user form and I need to have it execute a procedure in a worksheet module (same workbook). Basically I need to "Call mySubroutine()" from a form to an outside subroutine. How do you do that? Even a "GoTo xxx" would be fine. I looked at Chip P's site and using his "Programming To The Visual Basic Editor" (http://www.cpearson.com/excel/vbe.htm) I can programmatically find the procedure in the correct module and what line it begins on... if it even matters. Thanks, Toby Erkson -- Portland, Oregon -- http://www.bidata.net/ |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to jump from a Form procedure to a Workbook or Module procedure?
When I Compile the project I get the Microsoft Visual Basic error:
"Compile error: Sub or Function not defined" The subroutine being called is not private but is located in Sheet25 of the Microsoft Excel Objects group. I am NOT using Option Private Module. Everything is public within the project. Toby "Susan" wrote in message oups.com... just like you did............ only without the parentheses. code blah blah blah Call mySubroutine code blah blah blah make sure the sub for mySubroutine is a PUBLIC sub. susan On Jan 25, 1:46 pm, "T. Erkson" wrote: I have a procedure in a user form and I need to have it execute a procedure in a worksheet module (same workbook). Basically I need to "Call mySubroutine()" from a form to an outside subroutine. How do you do that? Even a "GoTo xxx" would be fine. I looked at Chip P's site and using his "Programming To The Visual Basic Editor" (http://www.cpearson.com/excel/vbe.htm) I can programmatically find the procedure in the correct module and what line it begins on... if it even matters. Thanks, Toby Erkson -- Portland, Oregon -- http://www.bidata.net/ |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to jump from a Form procedure to a Workbook or Module procedur
doh.
Thanks Jim, that worked. Never even crossed my mind to try that. Thank you! Toby "Jim Thomlinson" wrote in message ... Have you tried being more explicit in your reference??? Call Module1.mySubroutine() -- HTH... Jim Thomlinson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
to call procedure in a worksheet in a module | Excel Discussion (Misc queries) | |||
get module line from erl and procedure | Excel Programming | |||
Add Procedure To Module Via VBA | Excel Programming | |||
Lines in a Module(Procedure) | Excel Programming |