I have checked related questions such as this or this one but the solutions there do not seem to solve my problem.
I am running a VBA script on my computer. The script takes a few minutes to execute and while waiting I am checking other things in my computer. To get my attention once the script has finished running, I have included a MsgBox
at the end of my script. However, because Excel is not active/selected when the script finishes, I cannot see it - only when I reactivate/select Excel.
How can I bring into focus the MsgBox
when Excel is not active? I have already tried the following tweaks but they do not work:
ThisWorkbook.Activate:
... ThisWorkbook.Activate MsgBox "..." ...
AppActivate() (this command threw an error):
... AppActivate("Microsoft excel") MsgBox "..." ...