Dim Doc Dim hWnd As Long For Each IE In SWs Set Doc = IE.document If TypeOf Doc Is HTMLDocument Then If IsObject(Doc.parentWindow.opener) Then IE.Quit End If Sleep 200 DoEvents End If Next ------------------------------------ CSDN新版论坛助手:http://community.csdn.net/Expert/TopicView.asp?id=3108679
Dim hWnd As Long
For Each IE In SWs
Set Doc = IE.document
If TypeOf Doc Is HTMLDocument Then
If IsObject(Doc.parentWindow.opener) Then
IE.Quit
End If
Sleep 200
DoEvents
End If
Next
------------------------------------
CSDN新版论坛助手:http://community.csdn.net/Expert/TopicView.asp?id=3108679