Using 7.4.8
To recreate - add a new module to an Excel workbook with the following;
Code:
Sub A()
Response = MsgBox("Macro Complete.", 0, "Macro Complete")
End Sub
Then create a new PKB Macro;
Code:
{keys}
{alt}{F8}{alt}
{waitfor}("WIN","OPEN","[#Microsoft Excel - Book1.xlsm|XLMAIN|#2135|#77]\[Macro|bosa_sdm_XL9|#734|#324]",0,0)
{enter}
{waitfor}("WIN","OPEN","[#Microsoft Excel - Book1.xlsm|XLMAIN|#2135|#77]\[Macro Complete|\#32770|#619|#476]",0,0)
{enter}
{waitfor}("WIN","CLOSE","[#Microsoft Excel - Book1.xlsm|XLMAIN|#2135|#77]\[Macro Complete|\#32770|#619|#476]",0,0)
{msg}(-100,-100,"Success","Message",1,0,0,1)
Replace { with < and } with > .
Go back to Excel, run the PKB macro, and it will just wait forever with the "Macro Complete" popup open in Excel.
What am I missing? I need PKB to wait for a VBA macro to complete, the duration of which can vary widely, and then take further action. I can signify the end of a VBA macro with a popup - is there a better way to solve this, or soome function of win open I'm missing? |