[vb6.0/vba] Find IE / 열려있는 익스플로워(InternetExplorer) 창을 찿아 URL을 바꿈 > vb6.0/vba

본문 바로가기

vb6.0/vba

[vb6.0/vba] [vb6.0/vba] Find IE / 열려있는 익스플로워(InternetExplorer) 창을 찿아 URL을 바꿈

회원사진
하나를하더라도최선을
2020-03-16 21:51 4,606 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

등록된 댓글이 없습니다.
게시판 전체검색