ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Running Macros in Access from Excel (https://www.excelbanter.com/excel-programming/300623-running-macros-access-excel.html)

Simon Dowse

Running Macros in Access from Excel
 
Hi,

Is there nayway to write some script in Excel that opens
Access, runsa pre-recorded macro and then closes Access?
I also want this to be invisible to the user.

Many thanks in advance,
Simon

tod

Running Macros in Access from Excel
 
You can do something like this:

Sub ljd()

Set db = GetObject("C:\DatabasePath\DatabaseName.mdb")
db.DoCmd.RunMacro ("SampleMacro")
db.Quit
Set db = Nothing

End Sub

tod

-----Original Message-----
Hi,

Is there nayway to write some script in Excel that opens
Access, runsa pre-recorded macro and then closes Access?
I also want this to be invisible to the user.

Many thanks in advance,
Simon
.



All times are GMT +1. The time now is 10:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com