Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling a module 1

Status
Not open for further replies.

judyscofield

Programmer
Sep 24, 2001
56
US
I'm in the event code of a command button and would like to run a module. What is the syntax to call a module? I can use runcmd.domacro to call a macro, etc., but I'm getting errors calling a module.

Thanks
Judy Scofield
 
Dear Judy

You don't call a module but any function or sub procedure within the module.

If you put a sub procedure you want to call in a general module (modules tab) then you just write a name of that procedure in your event procedure.

Procedure in general module:
Sub ProcedureToBeCalled()
...
...
End Sub

Event procedure:
Sub Command0_Click()
...
...
ProcedureToBeCalled
...
...
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top