Identify if ShoworderWindow is closed

Hi @HowUTrade

How to identify if ShoworderWindow is closed?

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?

Thanks in advance.

  • HowUTrade

    Could you pls approve the comment?
  • sujith
    Posting this on behalf of @HowUTrade,


    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.

    Possible solution:
    1. You can create your own OrderWindow with VBA
Sign In or Register to comment.