Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
to call procedure in a worksheet in a module CAPTGNVR Excel Discussion (Misc queries) 4 January 30th 07 09:39 PM
get module line from erl and procedure RB Smissaert Excel Programming 7 February 17th 06 01:43 AM
Add Procedure To Module Via VBA Al Excel Programming 2 May 20th 05 10:58 PM
Lines in a Module(Procedure) Juan Melero Excel Programming 6 December 30th 03 12:38 AM


All times are GMT +1. The time now is 09:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"