Call a macro from another form ?

  • Thread starter Thread starter SpookiePower
  • Start date Start date
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
 
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(...)
 
That was for a procedure or a function. I tried to read between the lines.
I don't do anything with macros
 
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.
 
Back
Top