Does anyone know how to use VBA to detect if there is currently a command running in Alphacam?

We have created a macro in VBA for Alphacam. It works great under ideal circumstances. The problem is, if there is currently a command in use (like delete) the macro can be run at the same time, but bad things happen (the worst being Alphacam completely locks up and becomes unresponsive and you have to "end task" to kill it and be able to use the computer again)

We do not have this problem if there is not a commmand (such as delete) running when our macro is executed. Unfortunately we have one user that is not paying attention and is constantly running the macro when some other command is still active.

We would like to be able to detect if a command is currently active, warn the user, and prevent execution of our macro. (or even exit the other command, then run our macro)

Any help appreciated.