I am looking for a macro that will bring a currently open internet explorer window into view. And if the site is not currently open, open it.
http://www-acg.bru-hub.dhl.com/track/app
http://www-acg.bru-hub.dhl.com/track/app
Sub TrackShipment(control As IRibbonControl)
Dim IE As Object
With CreateObject("Shell.Application").Windows
If .Count > 0 Then
' Get IE
Set IE = .Item(0) '.Item(.Count + 1)
Else
' Create IE
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
End If
IE.Navigate "whateverwebpage"
Set IE = Nothing
End With
End Sub
Sub Test()
NavigateTo "whateverwebpage" ' Replace "whateverwebpage" by URL
End Sub