0

I'm trying to write a VBA script to export all of the VBA code in a given file to plaintext files for version control. I've already solved that part thanks to a bunch of answers and google results .

However, I'm now looking to automate this process for MS Access. I've done it successfully in Excel by putting code in the ThisWorkbook module which runs on the Workbook_BeforeSave event.

However, I've been unable to find any analog to ThisWorkbook in MS Access.

So the question is:

How can I execute VBA on the BeforeSave event in Access?

I'd like this to run on either a save in MS Access or a save in the VBA Editor.

Thanks

Community
  • 1
  • 1
dthor
  • 1,749
  • 1
  • 18
  • 45
  • I don't think access have a `beforeSave` event at all. after all all data are always imediatly writen to the disk anyway. – litelite May 20 '16 at 17:19
  • Are you asking about an event which fires when VBA code changes are saved? – HansUp May 20 '16 at 17:32
  • You might want to give a glance to https://github.com/rubberduck-vba/Rubberduck. They are working on a solution with git. Hopefully the release of 2.0 is finished soon. – INOPIAE May 20 '16 at 17:38
  • @HansUp Yes, that's correct. To litelite: Yes, that's what I thought the case was. To INOPIAE: Thanks for the info, I'll check it out. – dthor May 20 '16 at 17:52

0 Answers0