0

Do not know VBA - cannot fix the error - please help.

Bold shows the red area on macro

Sub Macro3() ' ' Macro3 Macro ' ' Keyboard Shortcut: Ctrl+q ' Sheets.Add ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:="!Table1", Version:=xlPivotTableVersion14).CreatePivotTable TableDestination :="Sheet4!R3C1", TableName:="PivotTable3"_, DefaultVersion:=xlPivotTableVersion14

Sheets("Sheet4").Select Cells(3, 1).Select With ActiveSheet.PivotTables("PivotTable3").PivotFields("Material") .Orientation = xlRowField .Position = 1 End With With ActiveSheet.PivotTables("PivotTable3").PivotFields("PO created") .Orientation = xlColumnField .Position = 1 End With ActiveSheet.PivotTables("PivotTable3").AddDataField ActiveSheet.PivotTables( _ "PivotTable3").PivotFields("Open Qty."), "Sum of Open Qty.", xlSum End Sub

Thanks,

Rick

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.