I'm using the code snippet from here Automate saveas dialouge for IE9 (vba) To invoke the open/save actions on the IEs download notification, with a few minor changes.
Specifically I use "Open".
It works fine, except I can't tell whether or not the file has been downloaded - if I have code running after the Download segment, then it fails as the workbook is not open yet.
I cannot use any further Do While loops because it occupies the excel/VBA thread, and the files refuses to open until the Macro has finished, which it doesnt as it waits for the workbook to open => infinite loop.
I tried a Do While loop with a check to see if there was an increase in open workbook count.
How can I detect that a download has finished/a new workbook is open and hence hang my code until that time?