Followhyperlink using specific web browser

  • Thread starter Thread starter Oreg
  • Start date Start date
O

Oreg

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
 
You could use the Shell() function, but you would have to know the path
of the Netscape executable on each system.
 
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,

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
 
Back
Top