'引用 Microsoft Internet Controls
Option Explicit
Private Sub Command1_Click()
Dim x As New SHDocVw.ShellWindows
Dim i As Long
For i = 0 To x.Count - 1
If VBA.TypeName(x.Item(i).Document) = "HTMLDocument" Then
'If VBA.TypeName(x.Item(i)) = "IWebBrowser" Then
Debug.Print VBA.TypeName (x.Item(i))
Debug.Print x.Item(i).hWnd
'End If
End If
Next i
End Sub
Option Explicit
Private Sub Command1_Click()
Dim x As New SHDocVw.ShellWindows
Dim i As Long
For i = 0 To x.Count - 1
If VBA.TypeName(x.Item(i).Document) = "HTMLDocument" Then
'If VBA.TypeName(x.Item(i)) = "IWebBrowser" Then
Debug.Print VBA.TypeName (x.Item(i))
Debug.Print x.Item(i).hWnd
'End If
End If
Next i
End Sub
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货