Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
I want to create a pivot table using the pivot table wizzard from a worksheet
into a worksheet with the name table by running a macro. when I record the macro I create the pivot table using the wizzard and it works fine but when I try to run the macro again it errors "unable to get the pivot tables property of the worksheet class" any help? |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Hi
Post the code you have created -- Regards Roger Govier "skippy51" wrote in message ... I want to create a pivot table using the pivot table wizzard from a worksheet into a worksheet with the name table by running a macro. when I record the macro I create the pivot table using the wizzard and it works fine but when I try to run the macro again it errors "unable to get the pivot tables property of the worksheet class" any help? |
#3
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Sub pivottest1()
' ' pivottest1 Macro ' Macro recorded 5/11/2008 by Skip Bryczek ' ' Sheets("temps").Select Cells.Select Selection.Clear Range("A1").Select Sheets("Temp_report").Select ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase, SourceData:= _ "Temp_report!R1C1:R697C16").CreatePivotTable TableDestination:= _ "'[Scanner Readings test1.xls]temps'!R1C1", TableName:="PivotTable1", _ DefaultVersion:=xlPivotTableVersion10 With ActiveSheet.PivotTables("PivotTable1") .ColumnGrand = False .PageFieldOrder = xlOverThenDown .PageFieldWrapCount = 8 .RowGrand = False End With ActiveSheet.PivotTables("PivotTable1").AddFields RowFields:="Asset", _ ColumnFields:="Item" With ActiveSheet.PivotTables("PivotTable1").PivotFields ("Reading") .Orientation = xlDataField .Caption = "Average of Reading" .Function = xlAverage End With ActiveWorkbook.ShowPivotTableFieldList = False End Sub "Roger Govier" wrote: Hi Post the code you have created -- Regards Roger Govier "skippy51" wrote in message ... I want to create a pivot table using the pivot table wizzard from a worksheet into a worksheet with the name table by running a macro. when I record the macro I create the pivot table using the wizzard and it works fine but when I try to run the macro again it errors "unable to get the pivot tables property of the worksheet class" any help? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pivot Table from Macro | Excel Discussion (Misc queries) | |||
Pivot Table by Macro? | Charts and Charting in Excel | |||
Is it possible to Macro a Pivot Table? | Excel Worksheet Functions | |||
Pivot Table Macro | Excel Discussion (Misc queries) | |||
MACRO FOR PIVOT TABLE | Excel Discussion (Misc queries) |