Exporting MS Access Forms and Class / Modules Recursively to text files?

后端 未结 6 1203
时光取名叫无心
时光取名叫无心 2020-12-01 05:57

I found some code on an ancient message board that nicely exports all of the VBA code from classes, modules and forms (see below):

Option Explicit
Option Com         


        
6条回答
  •  独厮守ぢ
    2020-12-01 06:28

    Lovely answer Clon.

    Just a slight variation if you are trying to open MDBs that has a startup form and/or a AutoExec macro and above doesn't always seem to work reliably.

    Looking at this answer on another website: By pass startup form / macros and scrolling almost to the end of the discussion is some code which temporarily gets rid of the startup form settings and extracts the AutoExec macro to your database before writing over it with an TempAutoExec macro (which does nothing), does some work (between lines 'Read command bars and app.CloseCurrentDatabase) and then fixes everything back again.

提交回复
热议问题