Deactivate Autoexec via VBA

K

kfschaefer

I have a set of mdbs - I need to copy the mdb and then deactivate the copied
mdb- autoexec prior to zipping the file for the user.

What is the best approach and where in my code should I put this
modification -

in main.mdb (run 1st - with a ShellEX of mdb2) Mdb2 - runs autoexec that
imports a couple of tables. Mdb2 needs to be zipped and then a FileSaveAs
dialog is opened for the user to save to local pc..
 
D

david epsom dot com dot au

If you use a start up form instead of an autoexec macro.
you can use dao to delete the 'startupform' property:

db.Containers("databases").Documents("msysdb").Properties(StartUpForm)

To delete an autoexec macro, you need to open the
database in Access, select the object, and delete it:

DoCmd.SelectObject acMacro, "Macro1"
docmd.deleteobject


(david)
 

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