dan_l
Active Member
It seems like every question I ask has something to do with VBA. I have no idea why.
I have this:
Sheets("groups").PivotTables("PT1").PivotFields("Name").AutoSort _
xlDescending, "Average of W", ActiveSheet.PivotTables("PT1"). _
PivotColumnAxis.PivotLines(1), 1
It works when I'm actually on the groups worksheet. However, when I'm on a different worksheet, excel throws an error.
I have this:
Sheets("groups").PivotTables("PT1").PivotFields("Name").AutoSort _
xlDescending, "Average of W", ActiveSheet.PivotTables("PT1"). _
PivotColumnAxis.PivotLines(1), 1
It works when I'm actually on the groups worksheet. However, when I'm on a different worksheet, excel throws an error.