How to jump from a Form procedure to a Workbook or Module procedure?

  • Thread starter Thread starter T. Erkson
  • Start date Start date
T

T. Erkson

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/
 
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
 
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
 
Back
Top