[vb6.0/vba] [vb6.0/vba] Find IE / 열려있는 익스플로워(InternetExplorer) 창을 찿아 URL을 바꿈
익명
2020-03-16 21:51
2,726
0
본문
열려있는 인터넷 익스플로워(InternetExplorer) 창을 찿아서 모두 URL을 바꾸어 주는 예제 입니다.
Dim IE As Object
Sub FindIE()
Dim obj As Object, Count&, URL$, Title$
Set obj = CreateObject("Shell.Application")
On Error Resume Next
Count = obj.Windows.Count
For x = 0 To (Count - 1)
URL = obj.Windows(x).Document.Location
Title = obj.Windows(x).Document.Title
If TypeName(obj.Windows(x).Document) = "HTMLDocument" Then
Set IE = obj.Windows(x)
IE.Navigate2 "http://map.daum.net/?q=" + UTF8([A1].Text)
End If
Debug.Print Title, URL, TypeName(obj.Windows(x).Document)
Next
End Sub
댓글목록0