Dim objShell As Object
Dim objIE As Object
Dim n As Integer
Set objShell = CreateObject("Shell.Application")
For n = objShell.Windows.Count To 1 Step -1
Set objIE = objShell.Windows(n – 1)
If objIE Is Nothing Then
Exit For
End If
If Right(UCase(objIE.FullName), 12) = "IEXPLORE.EXE" Then
Debug.Print objIE.document.URL
If objIE.document.URL = www.office26. Then
End If
End If
转载请注明:范的资源库 » ExcelVBA切换识别IE窗口