• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

pivot table must be hyperlinked to internal files

You won't get true hyperlinks in a pivot table.
But you can do this:

You will need to adapt the following already adapted code from that link to suit yourself:
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim selPF As PivotField, strField As String, strAdd As String, myVal As String

strField = "P.O.  NO."
On Error Resume Next
Set selPF = Target.PivotField
If Not selPF Is Nothing Then
  If selPF.Name = strField Then
    myVal = Target.Value
    If Len(myVal) > 0 Then ThisWorkbook.FollowHyperlink Address:="C:\Users\blah\Documents\" & myVal & ".pdf", NewWindow:=True
  End If
End If
End Sub
 
Hi, Thank you so much for your reply. I tried the code but it didn't work for me. :(
I'm sorry Im not good with coding. Hope you can help me. The P.O No. on the Source sheet is link to a pdf file and on the pivot table I want to create a fake hyperlink so that everytime I click the P.O No. the particular pdf file will open.
 

Attachments

Back
Top