Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello:
I've recorded a macro in which I'm copy-pasting the same pivot table in the same worksheet and then changing the display of number inside to show as % of column but am receiving: Run-time error '1004' - Unable to get the PivotTables property of the Worksheet class The error highlights the following portion of the macro: With ActiveSheet.PivotTables("PivotTable2").PivotFields ("Sum of Amount") Here is portion of the macro including the line above that is highlighted when I click on "Debug": Range("A4:G14").Select Range("G14").Activate Selection.Copy Range("J4").Select ActiveSheet.Paste Columns("J:J").EntireColumn.AutoFit Columns("K:P").Select Selection.ColumnWidth = 8.8 Range("K8:P14").Select Application.CutCopyMode = False With ActiveSheet.PivotTables("PivotTable2").PivotFields ("Sum of Amount") .Calculation = xlPercentOfColumn .NumberFormat = "0.00%" End With Please help, I'm not too good with macros :). Thank you. Monika |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run-time error: '1004' | Excel Worksheet Functions | |||
Run-time error '1004' | Excel Discussion (Misc queries) | |||
run time error 1004 | Excel Worksheet Functions | |||
Run time error 1004 | Excel Discussion (Misc queries) | |||
Run time error 1004, General ODBC error | New Users to Excel |