Created
May 10, 2015 21:48
-
-
Save kumatti1/61e16e96c386aa77ca5d to your computer and use it in GitHub Desktop.
EPM_IE
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 | |
Private Declare PtrSafe _ | |
Function IWebBrowser_Navigate2 Lib "shlwapi.dll" Alias "#575" ( _ | |
ByVal IE As Object, _ | |
ByVal url As LongPtr, _ | |
ByVal Flags As LongPtr, _ | |
ByVal TargetFrameName As LongPtr, _ | |
ByVal PostData As LongPtr, _ | |
ByVal Headers As LongPtr _ | |
) As Long | |
Sub hoge() | |
Const url = "http://www.yahoo.co.jp/" | |
Dim IE As Object | |
Set IE = CreateObject("InternetExplorer.Application") | |
IE.Visible = True | |
Dim hr As Long | |
hr = IWebBrowser_Navigate2(IE, StrPtr("http://www.yahoo.co.jp/"), 0, 0, 0, 0) | |
'CallByName IE, "Navigate2", VbMethod, url | |
'IE.Navigate url | |
While IE.busy Or IE.ReadyState <> 4 | |
DoEvents | |
Wend | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment