Welcome to the Board!
Can you explain exactly what you are trying to accomplish here? If the database is already open, why would you try to be running a macro in it from an outside source instead of just doing from inside the database itself?
If this is a matter of you are trying to schedule something to run at a specific time, and the database may or may not be open at that time, I would approach it in a different manner.
First, split your database into a separate back-end and front-end(s). If you have multiple users (or processes) simultaneously using the same database, this is recommended anyway.
See here for instructions on how to do that:
https://support.microsoft.com/en-us...y-split-a-access-database-in-microsoft-access
Then create separate front-ends. One, for your users (and each user should have their own copy of the front-end). And a second for this scheduled process. So the scheduled process would be using its own front-end, and it wouldn't interfere with other users having their own copy of the front-end open.