Access Pivot Data
I am hoping someone can tell me how to access all of the data in a pivot
table field. I have a pivot table and based on the value chosen in a drop
down, values are populated in the printable area of the sheet (kind of an
excel version of mail merge). I am trying to find a way to access the values
in the drop down and loop through them to print all pages at once. I pasted
below my pitiful attempt - all suggestions welcome!
Sub PrintForms()
Dim StartRow
Dim EndRow
Dim Msg As String
Dim i
Sheets("1").Activate
With ActiveChart.PivotLayout.PivotTable.PivotFields("Mo nid")
For i = 1 To .PivotItems.Count
Range("B1") = PivotFields("Monid").Value
ActiveSheet.PrintOut
Next
End With
End Sub
|