Click to See Complete Forum and Search --> : VB - Open URL from code in a *new* IE browser window
Fox
May 5th, 2003, 05:12 AM
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
techyspecy
May 5th, 2003, 05:32 AM
Cheers pal, Thats nice.
ae_jester
Jun 5th, 2003, 01:57 PM
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:
dynamic_sysop
Jun 7th, 2003, 05:01 PM
another way would be this :
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
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.