IE内核当前已经打开网页地址标题和个数
Option ExplicitPrivate Sub Form_Load()
'需要引用Microsoft Internet Controls对象
Dim WebCount As SHDocVw.ShellWindows
Dim tmpI As Long, tmpWeb As WebBrowser
Set WebCount = New SHDocVw.ShellWindows
MsgBox "已经打开" & WebCount.Count & "个网页"
For tmpI = 0 To WebCount.Count - 1
Set tmpWeb = WebCount.Item(tmpI)
Debug.Print tmpWeb.LocationURL
Debug.Print tmpWeb.LocationName
Next
Set tmpWeb = Nothing
End Sub
强力代码,谢谢分享
页:
[1]