Code:
Option Explicit
Public oIE As SHDocVw.InternetExplorer
Public oSW As SHDocVw.ShellWindows
Sub test()
Set oIE = New SHDocVw.InternetExplorer
Set oSW = New SHDocVw.ShellWindows
oIE.Visible = True
MsgBox oIE.LocationURL
End Sub
I've used Early Binding with reference added to the library objects (HTML Objects & Internet Control)
But I wonder how to do it in Late Binding, especially for SHDocVw.Internet Explorer and SHDocVw.ShellWindows.
Code:
Dim oShell As Object, oShellWindows As Object
Set oShell = CreateObject("Shell.Application")
Set oShellWindows = oShell.windows