PDA

View Full Version : How to detect IE modal window?



spamlove
11-27-2008, 08:17 AM
Hi all, I am trying to make an Excel macro, that is inserting and submiting some data to IE page. But if there an error occurs I can't recognize it, because IE throw error modal dialog (by javascript ShowModalDialog() ).
I can't modify that page so I need to solve it in my macro.

I use something like :

Dim SWs As New SHDocVw.ShellWindows
Dim IE As SHDocVw.InternetExplorer

Private Sub Form_Load()

For Each IE In SWs

' some tests

Next
End Sub

to find IE window to work with. Any suggestions ?

Thanks