export VBA code in forms, modules and reports

J

John B. Smotherman

I'm wondering if there's an automated (ie, using VBA) method to write the VBA
code that underlies my forms and reports to a text output file, external to
the database. For example, if I have a form called frmItems that has a
module, is there a way I could create a file called "frmItems_vba.txt" that
would have the VBA code from the module associated with the form? Thanks!
 
J

John B. Smotherman

Outstanding! Thanks, Doug. I knew I'd seen something about it SOMEWHERE...
 
M

Mackster66

You could use the built-in Documenter. Go to Tools>Analyze>Documenter. Go
to the Forms tab and select all and then click on the Options button. Select
Code on top and Nothing on the bottom and deselect the others. Go to the
Reports tab and click on the Options button. Select Code ont top and Nothing
on the bottom and deselect the others. Go to the Modules tab, select all and
then click on the Options button. Select Code and deselect the others.

Click the OK button and it will prepare the report. It may take a few
minutes if you have an extremely complex database. When it is complete,
select File>Export and export it as a .txt file.
 

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