Results 1 to 2 of 2

Thread: Open hyperlink in pivot table using chrome

  1. #1
    Acolyte thousand's Avatar
    Join Date
    Apr 2017
    Posts
    27
    Articles
    0
    Excel Version
    2010

    Open hyperlink in pivot table using chrome



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hi, is there a way to open a hyperlink in a pivot table using chrome. This works perfectly with IE but not chrome.

    Option Explicit


    Private Sub Worksheet_SelectionChange(ByVal Target As Range)


    'Declare variables and data types
    Dim ptc As PivotTable, Value As Variant, rng As Range, chromepath As String




    'Check if only 1 cell is selected
    If Target.Cells.Count = 1 Then

    'Iterate through each pivot table in active worksheet
    For Each ptc In ActiveSheet.PivotTables

    'If selected cell intersects with pivot table cell range
    If Not Intersect(Target, Range(ptc.TableRange1.Address)) Is Nothing Then

    'Does the cell contain a http or https link?
    If Left(Target.Value, 7) = "https://" Or Left(Target.Value, 8) = "https://" Then

    'Open hyperlink
    ActiveWorkbook.FollowHyperlink Address:=Target.Value, NewWindow:=True
    End If
    End If
    Next ptc
    End If

    End Sub

  2. #2
    Administrator Pecoflyer's Avatar
    Join Date
    Oct 2011
    Location
    Brussels Belgium
    Posts
    1,689
    Articles
    0
    Excel Version
    2010 on Xubuntu
    Please wrap your code with code tags ( the # button). Thanks
    Thank you Ken for this secure forum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •