RunCode action, Sub procedures, and Functions

D

davidchadwick

I am new to both Access and VBA. I wrote a module with a Sub procedure that
extracts data from Outlook so that i can generate a report. Now I see that
the RunCode action in my macro will only run Functions and that I should Call
the Sub procedure from within a Function. For the life of me I cannot figure
out what that Function would look like. To complicate matters, the other
piece of the module is a Quote Function that is used in the Sub procedure,
and I can't figure out whether I need to have the macro run the Quote
Function first or last or what. I am very confused and would greatly
appreciate any help in where I can go to find what are probably the very
simple answers to my question.
 
D

Douglas J. Steele

Actually, you should be able to simply change your existing Sub to a
Function. I'm not 100% certain why Access insists on it being a function,
because it's not necessary to have the function return a value.
 

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