Respected gurus, experts and MVPs,
I have written the following code for the pivot table and it is generating pi.Visible <Type Mismatch> error.
Sub piVisibleMismatch()
Dim lastrow As Long, endrow As Long
Dim Psheet As Worksheet, Dsheet As Worksheet
Dim Pcache As PivotCache, Ptable As...