Can not switch between the pop-up window and Excel for Mac


I have made an Excel add-in, which pops up a window either by or Dialog API.

I just tested it in Excel for Mac: when the window is opened, it seems that we can NOT put the focus back to Excel or the add-in taskpane; we have to close the window before choosing Excel or the add-in taskpane.

Does anyone know if there is a way to enable switching focus between popup window and Excel?

The dialog window is a modal in nature that forces the user to interact with it before they can go back to using the parent add-in/Office host. For interaction that requires back-n-forth with Excel, task-pane is the right place for UI.