View Full Version : Sleeper: Open web browser with specific address
ilyaskazi
06-16-2005, 02:12 AM
i need to launch iexplore with specific address from excel through vba.
also with Opera or Mozilla.
johnske
06-16-2005, 02:33 AM
Hi, probably the simplest way is with a coded hyperlink E.G.
'<< OPEN A WEB PAGE >>
Sub OpenWebPage()
On Error Goto 1
ActiveWorkbook.FollowHyperlink "http://www.vbaexpress.com/portal.php", NewWindow:=True
Exit Sub
1: MsgBox Err.Description
End Sub
Alternatively,
Option Explicit
Sub BeamMeUpScotty()
Dim ie AsObject
Set ie = CreateObject("InternetExplorer.Application")
On Error Goto 1
With ie
.navigate "http://www.vbaexpress.com/"
.Visible = True
End With
Set ie = Nothing
Exit Sub
1: MsgBox Err.Description
ie.Quit
Set ie = Nothing
End Sub
HTH,
John
ilyaskazi
06-16-2005, 03:21 AM
working perfect with internet explorer. thankyou.
But I also need some website to open with different web browser ...i.e. Mozilla & Opera.
Ivan F Moala
06-16-2005, 08:21 PM
working perfect with internet explorer. thankyou.
But I also need some website to open with different web browser ...i.e. Mozilla & Opera.
To do this you can use the shellexercute API.
See here http://www.xcelfiles.com/ShellExecuteA.html
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.