call procedure from another module

J

John Thomas

How do I run a procedure in my current module, which is located in another
module, The module name that I want run is Form1, in the window caption it
reads, Form_Form1:Class module. And I wan to call the procedure, Private Sub
Form_Load() in that Form1 module from another module?

Thanks John
 
S

Steve

You have to make the procedure public instead of private
in order to call it from another module.
Steve
 
J

John Thomas

I've changed it to a Public sub, how do you call it, I'm trying to do it the
following code, but it can't find it.
'Forms!Form1!.Form.Form_Load

Thanks
 
G

Guest

Try this:

Call Form_Form1.Form_Load
-----Original Message-----
I've changed it to a Public sub, how do you call it, I'm trying to do it the
following code, but it can't find it.
'Forms!Form1!.Form.Form_Load

Thanks



.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top