Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pivot table errors 1004

Status
Not open for further replies.

vba317

Programmer
Mar 5, 2009
708
US
I am getting error 1004 when my program gets to the pivot charts. There are two differnt points that this happens. Nay help is appreciated.

Tom

Code:
 With ActiveSheet
            'Added 8/10/2013 TD
            .Range("B9").Select
            .PivotTables("PivotTable1").PivotFields (strFld)
            .Orientation = xlPageField
            .Position = 1
        End With

AND

Code:
With goXL.ActiveSheet
    .Range("B9").Select
    .PivotTables("PivotTable1").PivotCache.Refresh
End With
 
What is strFld ?
Are you sure the actual active sheet has a PivoTable named PivotTable1 ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
strFld = Facility
How do I find out what the sheet name is?
 
Debug.Print goXL.ActiveSheet.Name

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
On the error on the refresh the name of the sheet is Svc_Summary
 
So, are you sure the Svc_Summary sheet has a PivoTable named PivotTable1 ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Yes I just found the SvcSummary template and there is a pivotchart called PivotTable1.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top