New to VBA. I simply trying to figure out why I cant select the first rows data Range from a pivot table from another sheet. Any ideas?
Sheet name with pivot table = Pivot Pivot table name = PivotTable3
Dim pt As PivotTable Set pt = Sheets("Pivot").PivotTables("PivotTable3")
Worksheets("Pivot").Activate
pt.PivotFields("Row Labels").DataRange.Select
Selection.Copy
I thought this would select the first Row for me. However I am met with error "1004"