AppActivate "CorelDRAW" generating an error (sometimes)

In my VBA macros with non-modal userforms, it is often the case that I want to "hand control back to CorelDRAW" after the macro has done something. For example, if the macro has been used to create a selection, I want focus to go back to CorelDRAW so that the user can directly delete or otherwise work with that selection.

I have been doing this using AppActivate "CorelDRAW".

Most of the time, this works fine, but on occasion, this will generate a runtime error 5 - Invalid procedure call or argument.

Once this starts happening, it keeps happening - with any macro in which I do that, and with some macros written by others. I can't see their code, but I'm assuming that they are doing something similar to what I am.

Shutting down and restarting CorelDRAW does not fix this. If I log off of Windows, then log in again, everything is fine.

Any suggestions for how to avoid this problem with my VBA macros?