ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Followhyperlink using specific web browser (https://www.excelbanter.com/excel-programming/342964-followhyperlink-using-specific-web-browser.html)

Oreg[_43_]

Followhyperlink using specific web browser
 

Hi,

I've created a form with a button that when pushed opens internet
explorer and pulls up a specific web address using the followhyperlink
method. Is there some code I could add to use Netscape 4.7 instead of
Internet Explorer ?

Thank you :)

Oreg


--
Oreg
------------------------------------------------------------------------
Oreg's Profile: http://www.excelforum.com/member.php...fo&userid=9195
View this thread: http://www.excelforum.com/showthread...hreadid=476643


Oreg[_44_]

Followhyperlink using specific web browser
 

Can't seem to figure this out. Does anyone have any suggestions ?

Thanks,

Oreg


--
Oreg
------------------------------------------------------------------------
Oreg's Profile: http://www.excelforum.com/member.php...fo&userid=9195
View this thread: http://www.excelforum.com/showthread...hreadid=476643


Nick Hebb

Followhyperlink using specific web browser
 
You could use the Shell() function, but you would have to know the path
of the Netscape executable on each system.

----
Nick Hebb
BreezeTree Software
http://www.breezetree.com


Oreg[_45_]

Followhyperlink using specific web browser
 

Hi Nick,

Thanks for the direction. Netscape is located on a shared drive where
I work where everyone can access at the same location - F:\Program
Files\Netscape\Communicator\Program\netscape.exe. Could you show me
how I could use the Shell () function to do this? That is if I provided
the right info.

Thanks

Oreg


--
Oreg
------------------------------------------------------------------------
Oreg's Profile: http://www.excelforum.com/member.php...fo&userid=9195
View this thread: http://www.excelforum.com/showthread...hreadid=476643


Nick Hebb

Followhyperlink using specific web browser
 
Oreg,

Here's some sample code:

Dim sPath As String
Dim sURL As String
Dim dTaskID As Double

sPath = "c:\program files\mozilla firefox\firefox.exe" 'my browser
sURL = "http://www.breezetree.com" 'shameless plug

dTaskID = Shell(sPath & " " & sURL, vbNormalFocus)

If dTaskID = 0 Then
MsgBox "Could not open browser"
End If


The key part for you will be determining the path of the netscape.exe
program. If everyone has the shared drive mapped to "F:" then it's no
problem, but most likely you'll need to get the UNC path for the drive.

The UNC would look like:
\\Server Name\Program Files\Netscape\Communicator\Program\netscape.exe

Where "Server Name" is the name of the shared drive. Also note that I
didn't use the follow_hyperlink event. You can just the put code in the
button's click event.

HTH,

Nick Hebb
BreezeTree Software
http://www.breezetree.com


Oreg[_46_]

Followhyperlink using specific web browser
 

Nick,


This is perfect!!!!!!! Thanks so much for the help...It work
perfectly !!! :) :)

Ore

--
Ore
-----------------------------------------------------------------------
Oreg's Profile: http://www.excelforum.com/member.php...nfo&userid=919
View this thread: http://www.excelforum.com/showthread.php?threadid=47664



All times are GMT +1. The time now is 05:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com