Sub Macro7()
'
' Macro7 Macro
'
ActiveCell.Offset(-2, -6).Range("A1").Select
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"PAF Folder!R1C1:R1048576C10", Version:=6).CreatePivotTable TableDestination _
:="City-Wise Payout!R3C1", TableName:="PivotTable11", DefaultVersion:=6
Sheets("City-Wise Payout").Select
Cells(3, 1).Select
With ActiveSheet.PivotTables("PivotTable11")
.ColumnGrand = True
.HasAutoFormat = True
.DisplayErrorString = False
.DisplayNullString = True
.EnableDrilldown = True
.ErrorString = ""
.MergeLabels = False
.NullString = ""
.PageFieldOrder = 2
.PageFieldWrapCount = 0
.PreserveFormatting = True
.RowGrand = True
.SaveData = True
.PrintTitles = False
.RepeatItemsOnEachPrintedPage = True
.TotalsAnnotation = False
.CompactRowIndent = 1
.InGridDropZones = False
.DisplayFieldCaptions = True
.DisplayMemberPropertyTooltips = False
.DisplayContextTooltips = True
.ShowDrillIndicators = True
.PrintDrillIndicators = False
.AllowMultipleFilters = False
.SortUsingCustomLists = True
.FieldListSortAscending = False
.ShowValuesRow = False
.CalculatedMembersInFilters = False
.RowAxisLayout xlCompactRow
End With
With ActiveSheet.PivotTables("PivotTable11").PivotCache
.RefreshOnFileOpen = False
.MissingItemsLimit = xlMissingItemsDefault
End With
ActiveSheet.PivotTables("PivotTable11").RepeatAllLabels xlRepeatLabels
With ActiveSheet.PivotTables("PivotTable11").PivotFields("City")
.Orientation = xlRowField
.Position = 1
End With
ActiveSheet.PivotTables("PivotTable11").AddDataField ActiveSheet.PivotTables( _
"PivotTable11").PivotFields("Amount"), "Sum of Amount", xlSum
With ActiveSheet.PivotTables("PivotTable11").PivotFields("Payment Status")
.Orientation = xlPageField
.Position = 1
End With
With ActiveSheet.PivotTables("PivotTable11").PivotFields("City")
.PivotItems("(blank)").Visible = False
End With
ActiveSheet.PivotTables("PivotTable11").PivotFields("Payment Status"). _
CurrentPage = "(All)"
With ActiveSheet.PivotTables("PivotTable11").PivotFields("Payment Status")
.PivotItems("Failed").Visible = False
.PivotItems("(blank)").Visible = False
End With
ActiveSheet.PivotTables("PivotTable11").PivotFields("Payment Status"). _
EnableMultiplePageItems = True
With ActiveSheet.PivotTables("PivotTable11").PivotFields( _
"Paid via Careem account")
.Orientation = xlColumnField
.Position = 1
End With
End Sub
can any body help me I'm unable to run macros after recording creating the Pivot table facing this yellow highlighted msg!
'
' Macro7 Macro
'
ActiveCell.Offset(-2, -6).Range("A1").Select
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"PAF Folder!R1C1:R1048576C10", Version:=6).CreatePivotTable TableDestination _
:="City-Wise Payout!R3C1", TableName:="PivotTable11", DefaultVersion:=6
Sheets("City-Wise Payout").Select
Cells(3, 1).Select
With ActiveSheet.PivotTables("PivotTable11")
.ColumnGrand = True
.HasAutoFormat = True
.DisplayErrorString = False
.DisplayNullString = True
.EnableDrilldown = True
.ErrorString = ""
.MergeLabels = False
.NullString = ""
.PageFieldOrder = 2
.PageFieldWrapCount = 0
.PreserveFormatting = True
.RowGrand = True
.SaveData = True
.PrintTitles = False
.RepeatItemsOnEachPrintedPage = True
.TotalsAnnotation = False
.CompactRowIndent = 1
.InGridDropZones = False
.DisplayFieldCaptions = True
.DisplayMemberPropertyTooltips = False
.DisplayContextTooltips = True
.ShowDrillIndicators = True
.PrintDrillIndicators = False
.AllowMultipleFilters = False
.SortUsingCustomLists = True
.FieldListSortAscending = False
.ShowValuesRow = False
.CalculatedMembersInFilters = False
.RowAxisLayout xlCompactRow
End With
With ActiveSheet.PivotTables("PivotTable11").PivotCache
.RefreshOnFileOpen = False
.MissingItemsLimit = xlMissingItemsDefault
End With
ActiveSheet.PivotTables("PivotTable11").RepeatAllLabels xlRepeatLabels
With ActiveSheet.PivotTables("PivotTable11").PivotFields("City")
.Orientation = xlRowField
.Position = 1
End With
ActiveSheet.PivotTables("PivotTable11").AddDataField ActiveSheet.PivotTables( _
"PivotTable11").PivotFields("Amount"), "Sum of Amount", xlSum
With ActiveSheet.PivotTables("PivotTable11").PivotFields("Payment Status")
.Orientation = xlPageField
.Position = 1
End With
With ActiveSheet.PivotTables("PivotTable11").PivotFields("City")
.PivotItems("(blank)").Visible = False
End With
ActiveSheet.PivotTables("PivotTable11").PivotFields("Payment Status"). _
CurrentPage = "(All)"
With ActiveSheet.PivotTables("PivotTable11").PivotFields("Payment Status")
.PivotItems("Failed").Visible = False
.PivotItems("(blank)").Visible = False
End With
ActiveSheet.PivotTables("PivotTable11").PivotFields("Payment Status"). _
EnableMultiplePageItems = True
With ActiveSheet.PivotTables("PivotTable11").PivotFields( _
"Paid via Careem account")
.Orientation = xlColumnField
.Position = 1
End With
End Sub
can any body help me I'm unable to run macros after recording creating the Pivot table facing this yellow highlighted msg!