VBA

Function PivotName(sh As Worksheet) As String
PivotName = ""
For Each p In sh.PivotTables
PivotName = p.Name
Exit For
Next p
End Function