Call a macro from another form ?

S

SpookiePower

I have two forms - a mainform with a subform on it.

Most of my code are on the main form, but I have startede to wirte
some code on the subform. In the code on the subform I need to call
some code from my main form. How can I do that ?
I can remember from my old Delphi Pascal days, that you must include
units to get access to code from other places, but how can I do it here
??

www.photo.activewebsite.dk
 
S

schasteen

For functions / sub make sure you use the word Public instead of Private at
the start. then you can use:
Call FunctionName(variables that need passed)
or if the function returns a value
Me![text1] = FunctionName(...)
 
S

schasteen

That was for a procedure or a function. I tried to read between the lines.
I don't do anything with macros
 
P

Phillip Windell

I think if you have a Proceedure that you may want to "re-use" on other
forms, it would be best to place the proceedure into a Code Module.
 

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