I have several Excel VBA documents that are sometimes automated and sometimes not, so they check the app.visible property to determine whether to display a message box. this works fine, except these documents will often be opened in internet explorer where the excelapp.visible property is always false. I've tried using excelapp.activewindow.visible, but it returns true and causes the msgbox to pop up even when the app is not visible. Is there a good way to solve this problem?