Last active
December 29, 2015 03:48
-
-
Save kumatti1/7609861 to your computer and use it in GitHub Desktop.
MSHTML.IHTMLWindow2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
'要参照設定 | |
'Microsoft HTML Object Library | |
Private WithEvents m_Doc As MSHTML.HTMLDocument | |
Private p As MSHTML.IHTMLWindow2 | |
Private flg As Boolean | |
Private Sub UserForm_Initialize() | |
flg = False | |
Set m_Doc = New MSHTML.HTMLDocument | |
Set p = m_Doc.parentWindow | |
p.navigate "http://www.yahoo.co.jp/" | |
Do | |
DoEvents | |
Loop Until flg | |
MsgBox m_Doc.URL | |
End Sub | |
Private Sub m_Doc_onreadystatechange() | |
If flg Then Exit Sub | |
If m_Doc.readyState = "complete" Then | |
flg = True | |
End If | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment