Link to home
Start Free TrialLog in
Avatar of RWayneH
RWayneHFlag for United States of America

asked on

Creating a Pivot Table

This used to work, why can I not place a pivot table on Sheet1 anymore?  Any ideas?  When I try to create one manually it says: "the data source you are trying to connect to is managed by an organization.  If you would like to reference it, please save your workbook in a location that is also managed."

I do use the data source tbl_pivot in a different workbook?  Does this mean that I need to name them uniquely? tbl_pivot1  2  3 ?


Sub CreateTop10PivotSheet()
    
    Sheets.Add.Name = "Sheet1"
    Sheets("Sheet1").Activate

     ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
         Range("tbl_pivot"), Version:=xlPivotTableVersion12).CreatePivotTable _
         TableDestination:="Sheet1!R3C1", TableName:="PivotTable1", DefaultVersion _
         :=xlPivotTableVersion12



    Range("A5").Select

Open in new window

SOLUTION
Avatar of Rartemass
Rartemass
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RWayneH

ASKER

True that, all sheet tabs have been renamed, (even the new Sheet1 gets renamed) so used to create a new Sheet1 every time.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RWayneH

ASKER

Thanks.