Code optimieren
29.11.2007 14:50:33
Jakob
ich habe folgenden Code mit den Makrorekorder aufgezeichnet. Er ist aber etwas langsam. Wie könnte man ihn optimieren und ihn zu beschleunigen.
Sub Land12M()
ActiveChart.PivotLayout.PivotTable.PivotFields("Jahr").CurrentPage = "(Alle)"
ActiveChart.PivotLayout.PivotTable.PivotFields("12 Monate Rol.").CurrentPage = _
"R"
ActiveChart.PivotLayout.PivotTable.PivotFields("Jahressicht").CurrentPage = _
"(Alle)"
ActiveChart.PivotLayout.PivotTable.PivotFields("Na MG").CurrentPage = _
"(Alle)"
With ActiveChart.PivotLayout.PivotTable.PivotFields("Land")
.Orientation = xlRowField
.Position = 1
End With
With ActiveChart.PivotLayout.PivotTable.PivotFields("CL")
.Orientation = xlRowField
.Position = 1
End With
End Sub
Vielen Dank im Voraus für Eure Hilfe.
Gruß,
Jakob