Calling Sub from Macro

  • Thread starter Thread starter Boon
  • Start date Start date
B

Boon

Hello,

I have a Sub in my Module.

e.g.

Sub Test()
dim temp variant

temp=msgbox("hello")

End Sub


How can I call this Sub in a Macro?


thanks.
 
What version of Access?

In Access 2003 and earlier, you need to change Test from a Sub to a Function
(it doesn't matter whether the function returns a value or not)

In Access 2007, I believe you can run Subs, but you need to ensure that
you've got the button depressed to Show All Macros.
 
I am using 2007.

I cannot run the Subs in 2007. at least I don't know how. There is only
"RunCode" in the macro command. I did show ALL Macros.

anyway, I use your suggestion for 2003 and it works fine.

thanks!
 
Back
Top