Share via

.VBS | Run Macro

Anonymous
2018-08-17T16:15:03+00:00

The code below is parked in a notepad file with a .vbs extension that opens an Access DB and runs an AutoExec macro.  I don't like using AutoExec --- can the code be changed to open a macro named "OnStart", for example?

dim accessApp

set accessApp = createObject("Access.Application")

accessApp.OpenCurrentDataBase("D:\Access\TestDB.accdb")

accessApp.Quit

set accessApp = nothing

Thanks in advance!

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments