View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
ShadowVixen ShadowVixen is offline
external usenet poster
 
Posts: 6
Default How to loop through PivotTable

Sorry for the delay in response. Yes, the pivot table is on the same
worksheet. However, the data is on a separate sheet in the same workbook.

"Die_Another_Day" wrote:

This is because you haven't selected the Pivot Chart. Is the chart on a
separate page?

Die_Another_Day
ShadowVixen wrote:
I am not sure - now I am getting an error message that says "Cant find
project or library". My code is below:

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