vipulgos
Active Member
- Joined
- Aug 17, 2002
- Messages
- 333
- Office Version
-
- 2010
- Platform
-
- Windows
Dear all,
I am trying below mentioned code to use it in non-default web browser, i.e. Firefox
Actually my Range("newadress") is looks like this:
https://www.google.co.in/maps/place/royal palm, goregaon, mumbai
But when I run the code Four Firefox windows get open
with addresses as under:
1) https://www.google.co.in/maps/place...x3c04a720fb60cd08!8m2!3d19.199489!4d72.846165
2) http://www.palm,.com/
3) http://www.goregaon,.com/
and 4) http://mumbai/
I just want the firefox to show me link as:
https://www.google.co.in/maps/place/royal palm, goregaon, mumbai
Where I am going wrong?
But when I use the code with default browser as under:
It open in Chrome(my default browser), exactly as I wanted....
I am trying below mentioned code to use it in non-default web browser, i.e. Firefox
Code:
Sub Map_Click()
Dim sPath As String
Dim sURL As String
Dim dTaskID As Double
sPath = "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" 'my browser
sURL = Range("newadress")
dTaskID = Shell(sPath & " " & sURL, vbNormalFocus)
If dTaskID = 0 Then
MsgBox "Could not open browser"
End If
End Sub
Actually my Range("newadress") is looks like this:
https://www.google.co.in/maps/place/royal palm, goregaon, mumbai
But when I run the code Four Firefox windows get open
with addresses as under:
1) https://www.google.co.in/maps/place...x3c04a720fb60cd08!8m2!3d19.199489!4d72.846165
2) http://www.palm,.com/
3) http://www.goregaon,.com/
and 4) http://mumbai/
I just want the firefox to show me link as:
https://www.google.co.in/maps/place/royal palm, goregaon, mumbai
Where I am going wrong?
But when I use the code with default browser as under:
Code:
ActiveWorkbook.FollowHyperlink Address:=Range("newadress").Value, NewWindow:=True
Last edited: