Share via

print vba code

Anonymous
2011-06-02T12:11:45+00:00

Is there a good way to print/view all of the VBA code within my database (approximately 20 forms)?  I am looking to copy/paste and would rather not highlight each form.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2011-06-02T12:49:31+00:00

    You can use the documenter function to print a report that has all the code.

    In design mode, select Tools: Analyze: Documenter

    • Select the Tab for Forms
    • Click Select All
    • Click Options and check Code (uncheck properties - unless you want the form properties)
    • Click OK
    • Select the tab for Reports
    • Click Select All
    • Click Options and check Code
    • Click Ok
    • Select the tab for modules
    • Click Select All
    • Click options and Check Code

    Another option is to use VBA code to step through all the modules and put the code into a memo field. 

    I have a VBA routine that does part of that.  It steps through the VBA modules (not the code associated with individual forms and reports) and gives me the name of the module, name of the procedure, the procedure call, and the initial comments in the procedure.

    Was this answer helpful?

    0 comments No comments