I wrote several modules in my Access 2002 database, and I now want to run them, but I can't, because the run button in the modules view is greyed out. How can I get the button to work?
Modules themselves can't be run as standalone applications; the subs and functions within them can be executed by calling them from event handers within forms, reports etc or from macros with the RunCode action.
For example
result = FunctionName (ParameterList)
or
SubName
If the module is a class module, then it has to be instantiated and called from another VBA routine.
Thanks for the info. I have solved the problem by using a runcode macro. Of course, now I'm wondering what the purpose of that run button on the modules page is?
Click in a sub or function (with no arguments), then press F8. You'll be in 'step by step' mode and the Run button will be enabled. It has only debugging purposes.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.