Copy a macro to another database and run it there

L

Lesley Regan

Dear Macro Pros and MVPs,

I run command line code to run a macro from one database
into another.

I get an error if I try to run the macro without quitting
Access and saving all. I have to quit and then reopen
it. Since this is remote control, I can't click "Save".

I don't know the code or macro lines to save the copied
macro in the database it's been copied into before I run
the macro.

Object -- copy macro, save it, don't quit the database and
reopen before running it.

Does this make sense?

Any help would be appreciated.

Lesley Regan
 
D

dandgard

if you are trying to get the macro from a database then it should exis
in the databases object collection. you should be able t
programmatically copy it from one db to the other using vba. Neve
heard of being able to do that from the command line
 
D

dandgard

if you are trying to get the macro from a database then it should exis
in the databases object collection. you should be able t
programmatically copy it from one db to the other using vba. Neve
heard of being able to do that from the command line
 
G

Guest

Hi dandgard

Have been away. Thanks for your reply. I appreciate it.

Lesle

----- dandgard wrote: ----


also

docmd.transferdatabase should wor
 

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