Pivot create
Jesse wrote:
Can anyone help me figure out why this line of code does not work?
ActiveWorkbook.PivotTableWizard SourceType:=xlDatabase,
SourceData:=Sheets("BDData").UsedRange,
tabledestination:=Sheets("BD").Cells(1, 5), tablename:="BDPivot"
PivotTableWizard is a method of a worksheet, not a workbook.
So try
Sheets("BD").PivotTableWizard SourceType:=xlDatabase,
SourceData:=Sheets("BDData").UsedRange,
tabledestination:=Sheets("BD").Cells(1, 5), tablename:="BDPivot"
Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup
|