I am calling the ShowOrderWindow form to place an order but don't want my macro to proceed further until the order is placed. Can you please tell me how can I identify if the Showorderwindow is closed so that I can add a loop to wait until the showorderwindow returns some value or is closed completely?
Could you pls approve the comment?
The 'ShowOrderWindow' is modeless dialog box, hence your macro will continue to execute your next line of code after the ShowOrderWindow is shown.
Why modeless dialog?
With modeless, you can open multiple order windows (for multiple symbols) simultaneously and it will not block your main UI (Excel or .Net app). If it is modal dialog then, you can open only one window and you will not be able to access the main UI until the open window is closed.
1. You can create your own OrderWindow with VBA