vipulgos
Active Member
- Joined
- Aug 17, 2002
- Messages
- 335
- Office Version
- 2010
- Platform
- Windows
Hi
I am using this VBA successfully in Win10, Office 2010.
This link allows me to go to Firefox and open the links directly from VBA
But after changing my pc with Win11, Office2010 this is not working. sURL3 is working properly, but the sURL2 part, which is expected to open the location of the particular building under some village and some province (taluka) is not working.
No doubt it tries to open (I can see the expected url text in browser, but map coming back to my present location
Please guide me. Following is the essential part of code:
I am using this VBA successfully in Win10, Office 2010.
This link allows me to go to Firefox and open the links directly from VBA
But after changing my pc with Win11, Office2010 this is not working. sURL3 is working properly, but the sURL2 part, which is expected to open the location of the particular building under some village and some province (taluka) is not working.
No doubt it tries to open (I can see the expected url text in browser, but map coming back to my present location
Please guide me. Following is the essential part of code:
VBA Code:
Dim spath As String
Dim spath1 As String
Dim sURL As String
Dim sURL1 As String
Dim sURL2 As String
Dim sURL3 As String
Dim newvil
Dim dTaskID As Double
On Error GoTo 2:
spath = "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" 'my browser
sURL2 = Replace(Range("buildname2").Value, " ", "+") & "+" & newvil & "+" & Range("taluka")
newvil = IIf(InStr(Range("village"), " "), Replace(Range("village"), " ", "+"), Range("village"))
sURL3 = Replace(Range("buildname3").Value, " ", "+") & "+" & newvil & "+" & Range("taluka") & "+Flat+sale"
dTaskID = Shell(spath & " " & sURL2 & " -new-tab " & sURL3, vbNormalFocus)
Exit Sub
2:
spath1 = "C:\Program Files\Mozilla Firefox\firefox.exe" 'my browser
sURL2 = Replace(Range("buildname2").Value, " ", "+") & "+" & newvil & "+" & Range("taluka")
sURL3 = Replace(Range("buildname3").Value, " ", "+") & "+" & newvil & "+" & Range("taluka") & "+Flat+sale"
dTaskID = Shell(spath1 & " " & sURL2 & " -new-tab " & sURL3, vbNormalFocus)
End Sub