Hello everyone,
I have a challenge that I can't seem to overcome. I hope someone can help
me out.
I have created a module in an access database called 'DeleteOldFiles'. The
purpose of which is to delete old unused files. I'd like to call this
module from a macro. But I can't seem to figure out how to do it. Does
anyone have any idea?
Thanks.
Any procedure inside your module that you want to run has to be a
function rather than a sub. No problem there as the only difference is
that functions return values but you can ignore the return value. Just
rename your subs functions. Then use the macro action of RunCode. It
takes one argument, the name of the function to run. If you really want
to keep your code in a sub, simply create an additional function that
does nothing but call your sub.
Hope this helps,
Richard Lobel