LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 76
Default Run-time error '1004'

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run-time error: '1004' Bishop Excel Worksheet Functions 2 May 21st 09 04:28 PM
Run-time error '1004' goconnor Excel Discussion (Misc queries) 8 July 18th 08 12:50 AM
run time error 1004 Louise Excel Worksheet Functions 0 January 18th 07 08:16 PM
Run time error 1004 Potoroo Excel Discussion (Misc queries) 2 December 30th 05 02:42 AM
Run time error 1004, General ODBC error [email protected] New Users to Excel 0 September 19th 05 01:41 AM


All times are GMT +1. The time now is 12:44 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"