Can I run macros in DB 1 but to execute macros in DB2 ?

RCMetrics

Board Regular
Joined
Oct 28, 2005
Messages
95
I'm looking into having one database to execute all of my taks of several other Databases...

I'll simplify this example for only 2 DB.

One of my database does several report and that gets e-mailed to people from the send object macro.

(This process happens in several DB and all have several macros in each)

I would like to create a dadabase "my taks.mdb"

From that new DB, I would like to run a macro that would in turn run all the macros needed in their respective DB without opening them.

Is this doable...? that would be prevent me from open several DB, wait for the query to run...etc....

any ideas?
 

Some videos you may like

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,069
Office Version
  1. 365
Platform
  1. Windows
I don't think this is possible without actually opening the databases.

You could possibly automate the opening/closing of the databases though.
 

pritcham

Board Regular
Joined
Oct 26, 2005
Messages
128
Hi

Another possible approach is to convert your macros to VBA. Once you've done that you can add references (from the VBA code editor screen select "Tools", "References" and then click "Browse", change the file type to "Access MDB" and select your other DBs) to your other DBs and run the newly created VBA functions from your (main) database.

Just tried it and I know it works for functions, don't have any macros to test it on though I'm afraid.

cheers
Martin
 

Watch MrExcel Video

Forum statistics

Threads
1,119,002
Messages
5,575,475
Members
412,667
Latest member
rpbenz
Top