thousand
New member
- Joined
- Apr 2, 2017
- Messages
- 30
- Reaction score
- 0
- Points
- 0
- Excel Version(s)
- 2010
Here is what I have that used to worked for Chrome
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count = 1 Then
'Declare variables and data types
Dim ptc As PivotTable, Value As Variant, rng As Range
Dim WebUrl As String
For Each ptc In ActiveSheet.PivotTables
If Left(Target.Value, 8) = "https://" Then
WebUrl = Target
'MsgBox ("Copy and paste link for now")
End
Shell ("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe -url " & WebUrl)
End If
Next ptc
End If
If Target.Cells.Count = 1 Then
On Error Resume Next
For Each ptc In ActiveSheet.PivotTables
If Left(Target.Value, 7) = "\\corp." Then
ActiveWorkbook.FollowHyperlink _
Address:=CStr(Target.Value), _
NewWindow:=True
On Error GoTo 0
End If
Next ptc
End If
End Sub
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count = 1 Then
'Declare variables and data types
Dim ptc As PivotTable, Value As Variant, rng As Range
Dim WebUrl As String
For Each ptc In ActiveSheet.PivotTables
If Left(Target.Value, 8) = "https://" Then
WebUrl = Target
'MsgBox ("Copy and paste link for now")
End
Shell ("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe -url " & WebUrl)
End If
Next ptc
End If
If Target.Cells.Count = 1 Then
On Error Resume Next
For Each ptc In ActiveSheet.PivotTables
If Left(Target.Value, 7) = "\\corp." Then
ActiveWorkbook.FollowHyperlink _
Address:=CStr(Target.Value), _
NewWindow:=True
On Error GoTo 0
End If
Next ptc
End If
End Sub