Export VBA-Code

  • Thread starter Thread starter Paul Haboeck
  • Start date Start date
P

Paul Haboeck

Hallo ng

I would like to export the vb-code from a Access-Project to a ascci file.

Exists a way to do this vom normal VBA?
Does sombody knows any tools to do this?

regards
Paul
 
I d not know if there is a way to do at runtime (while someone is using your
Access app and want to export VBA code, if this is what you mean. But why?).
If you simply want to get VBA code from the Access app you are working on,
then go to VBA editor and click menu "File->Export....". It saves selected
class/module as *.cls file (ascii file). Even simple way: Hit Ctrl+A and
Ctrl+C, then paste to Notepad.
 
Paul,

I don't know why you'd want to do it at runtime, however, there is an
undocumented procedure:
SaveAsText acModule, "modMyModule", "c:\MyModule.txt"

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
Try the (hidden) Method SaveAsText of the Application Object.

(Not sure with ADP but I think it should be the same as MDB).
 
Back
Top