VB Code:
Public Sub OpenURL(iURL As String) On Error Resume Next Dim Temp As Object 'Create instance Set Temp = CreateObject("InternetExplorer.Application") 'Open URL Temp.Navigate2 iURL Temp.Visible = True End Sub
Printable View
VB Code:
Public Sub OpenURL(iURL As String) On Error Resume Next Dim Temp As Object 'Create instance Set Temp = CreateObject("InternetExplorer.Application") 'Open URL Temp.Navigate2 iURL Temp.Visible = True End Sub
Cheers pal, Thats nice.
Do you need to add a reference to make this work? When I try it, it opens a blank screen every time.
:confused: :confused: :confused: :confused: :confused:
another way would be this :
Code:Private Sub Command1_Click()
ExecLink "http://google.com", vbNormalFocus
End Sub
Private Sub ExecLink(Url As String, style As VbAppWinStyle)
Shell "explorer.exe " & Url & "", stlye
End Sub