Copy a macro to another database and run it there

  • Thread starter Thread starter Lesley Regan
  • Start date Start date
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
 
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
 
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
 
Hi dandgard

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

Lesle

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


also

docmd.transferdatabase should wor
 
Back
Top