Run a Macro

Schedule a macro to run on your schedule. Your macro can perform multiple Actions and can also use the RunCode macro action to launch VBA functions contained in an Access module. For instance, a macro can generate nightly reports, perform analysis, import data, or reset settings.

Run Macro

Specify the name of your macro and amount of time to wait, if any.

  • If you do not specify the name of a macro to execute, Total Visual Agent simply launches your copy of Access with the specified database loaded. This can launch your autoexec macro or startup form.
  • If your database contains an Autoexec macro, it executes when Access opens, before the specified macro runs. Rename the Autoexec macro or make sure it does not interfere with your macro.
  • Total Visual Agent launches your database and macro, and cannot respond to prompts or other dialogs that appear. If Access displays a prompt, it remains open and does not complete your Macro Action. You should use the SetWarnings macro action to turn off the warning messages when update queries are run.
  • Total Visual Agent cannot determine what your macro does or whether it runs properly. Ensure that the macro executes correctly by interactively running Microsoft Access and the macro from the machine where Total Visual Agent runs. If Total Visual Agent runs a bad macro or a macro that does not exist, it still reports successful execution, since it cannot determine what the macro should do.
  • If you want to close the copy of Microsoft Access, your macro must include the Quit macro action. Total Visual Agent does not close the launched copy of Microsoft Access when the macro finishes.