fb7894
12-20-2017, 01:32 PM
Hello. I have a macro where i want to call a third-party add in and then crunch some numbers after the third-party add in has updated the sheet.
The problem is, use Application.Run "gvRefresh" to call the add-in code. But the add-in does not return records until my macro finishes.
i'm guessing this is because you can only run one macro at a time? I have tried DoEvents and Application.Wait with no luck.
Any suggestions? Here is my code...
Set wbArbTracker = Workbooks.Open(shtMain.Range("ArbTrackerPath"), , True)
Application.Run "gvRefresh"
DoEvents
Application.Wait (Now + TimeValue("0:00:10"))
' the gvRefresh should have returned additional rows to my spreadsheet, but it's not"
The problem is, use Application.Run "gvRefresh" to call the add-in code. But the add-in does not return records until my macro finishes.
i'm guessing this is because you can only run one macro at a time? I have tried DoEvents and Application.Wait with no luck.
Any suggestions? Here is my code...
Set wbArbTracker = Workbooks.Open(shtMain.Range("ArbTrackerPath"), , True)
Application.Run "gvRefresh"
DoEvents
Application.Wait (Now + TimeValue("0:00:10"))
' the gvRefresh should have returned additional rows to my spreadsheet, but it's not"