Skip to content

Instantly share code, notes, and snippets.

@kumatti1
Created May 10, 2015 21:48
Show Gist options
  • Save kumatti1/61e16e96c386aa77ca5d to your computer and use it in GitHub Desktop.
Save kumatti1/61e16e96c386aa77ca5d to your computer and use it in GitHub Desktop.
EPM_IE
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