Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi!
Can anyone find whats wrong with the following VBA, I cant seem to find why "With ActiveSheet.PivotTables(apuFirma & "Pivot").PivotFields("Stage") .Orientation = xlDataField .Caption = "Average of Stage" .Function = xlAverage" stops all the time. The whole code part(relevant) is below. Sheets(apuFirma & "Q" & qCount).Select ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase, SourceData:= _ "'" & apuFirma & "Q" & qCount & "'!A:B").CreatePivotTable TableDestination:="", TableName:= _ "'" & apuNimi & "Pivot" & "', DefaultVersion:=xlPivotTableVersion10" ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet.Cells(3, 1) ActiveSheet.Cells(3, 1).Select With ActiveSheet.PivotTables(apuFirma & "Pivot").PivotFields("Stage") .Orientation = xlDataField .Caption = "Average of Stage" .Function = xlAverage End With ActiveSheet.PivotTables(apuNimi & "Pivot").AddDataField ActiveSheet.PivotTables( _ apuFirma & "Pivot").PivotFields("Stage"), "Count of Stage", xlCount Range("A3").Select ActiveSheet.PivotTables(apuNimi & "Pivot").PivotFields("Count of Stage").Function _ = xlAverage Any ideas? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
PivotTables | Excel Discussion (Misc queries) | |||
PivotTables | Excel Discussion (Misc queries) | |||
New to Pivottables- need help | Charts and Charting in Excel | |||
Drill Down in PivotTables | Excel Discussion (Misc queries) | |||
PivotTables/VBA | Excel Programming |