AW: Beim Aufzeichnen gehts bein ausführen nicht
17.07.2007 10:42:08
Boris
Jetzt kommen wir der Sache näher, aber jetzt bekomme ich bei
ActiveChart.SeriesCollection(5).Name = "=""Gehalten"" (fast ganz unten;o))
eeinen laufzeitfehler '1004' Die Name-Eigenschaft der Series-Objekt kann nicht festgelgt werden.
Kann mir das mal jemand erklären? Wieso geht es bei den ersten vier?
Sub Makro1()
Columns("M:M").Cut
Columns("L:L").Insert Shift:=xlToRight
Charts.Add
With ActiveChart
.ChartType = xlColumnStacked100
.SetSourceData Source:=Sheets("Wiederhergestellt_Tabelle1").Range("B10,B12,B14,B16,B18, _
B20 , B22, B24, B26, F10: L10 , F12: L12 , F14: L14 , F16: L16 , F18: L18 , F20: L20 , F22: L22 , F24: L24 , F26: L26 "), PlotBy:=xlColumns
.HasTitle = True
.ChartTitle.Characters.Text = "Summen Teilnehmer/ Monat"
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With
ActiveChart.SeriesCollection(1).Select
ActiveChart.SeriesCollection(1).ApplyDataLabels AutoText:=True, LegendKey:= _
False, ShowSeriesName:=False, ShowCategoryName:=False, ShowValue:=True, _
ShowPercentage:=False, ShowBubbleSize:=False
ActiveChart.SeriesCollection(1).DataLabels.Select
Selection.AutoScaleFont = True
With Selection.Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
ActiveChart.SeriesCollection(2).Select
ActiveChart.SeriesCollection(2).ApplyDataLabels AutoText:=True, LegendKey:= _
False, ShowSeriesName:=False, ShowCategoryName:=False, ShowValue:=True, _
ShowPercentage:=False, ShowBubbleSize:=False
ActiveChart.SeriesCollection(2).DataLabels.Select
Selection.AutoScaleFont = True
With Selection.Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
.Background = xlAutomatic
End With
ActiveChart.SeriesCollection(3).Select
ActiveChart.SeriesCollection(3).ApplyDataLabels AutoText:=True, LegendKey:= _
False, ShowSeriesName:=False, ShowCategoryName:=False, ShowValue:=True, _
ShowPercentage:=False, ShowBubbleSize:=False
ActiveChart.SeriesCollection(3).DataLabels.Select
Selection.AutoScaleFont = True
With Selection.Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
ActiveChart.SeriesCollection(5).Select
ActiveChart.SeriesCollection(4).Select
ActiveChart.SeriesCollection(4).ApplyDataLabels AutoText:=True, LegendKey:= _
False, ShowSeriesName:=False, ShowCategoryName:=False, ShowValue:=True, _
ShowPercentage:=False, ShowBubbleSize:=False
ActiveChart.SeriesCollection(4).DataLabels.Select
Selection.AutoScaleFont = True
With Selection.Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
ActiveChart.SeriesCollection(5).Select
ActiveChart.SeriesCollection(5).ApplyDataLabels AutoText:=True, LegendKey:= _
False, ShowSeriesName:=False, ShowCategoryName:=False, ShowValue:=True, _
ShowPercentage:=False, ShowBubbleSize:=False
ActiveChart.SeriesCollection(5).DataLabels.Select
Selection.AutoScaleFont = True
With Selection.Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
.Background = xlAutomatic
End With
ActiveChart.SeriesCollection(6).Select
ActiveChart.SeriesCollection(6).ApplyDataLabels AutoText:=True, LegendKey:= _
False, ShowSeriesName:=False, ShowCategoryName:=False, ShowValue:=True, _
ShowPercentage:=False, ShowBubbleSize:=False
ActiveChart.SeriesCollection(6).DataLabels.Select
Selection.AutoScaleFont = True
With Selection.Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
ActiveChart.SeriesCollection(7).Select
ActiveChart.SeriesCollection(7).ApplyDataLabels AutoText:=True, LegendKey:= _
False, ShowSeriesName:=False, ShowCategoryName:=False, ShowValue:=True, _
ShowPercentage:=False, ShowBubbleSize:=False
ActiveChart.SeriesCollection(7).DataLabels.Select
Selection.AutoScaleFont = True
With Selection.Font
.Name = "Arial"
.FontStyle = "Fett"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
.Background = xlAutomatic
End With
ActiveChart.SeriesCollection(7).Points(1).DataLabel.Select
ActiveChart.PlotArea.Select
ActiveChart.SeriesCollection(7).DataLabels.Select
ActiveChart.SeriesCollection(7).Points(1).DataLabel.Select
ActiveChart.Axes(xlValue).MajorGridlines.Select
ActiveChart.Legend.Select
ActiveChart.ChartArea.Select
ActiveChart.Legend.Select
ActiveChart.SeriesCollection(1).Name = "=""Empfangen"""
ActiveChart.SeriesCollection(2).Name = "=""Beantwortet"""
ActiveChart.SeriesCollection(3).Name = "=""Abgebrochen"""
ActiveChart.SeriesCollection(4).Name = "=""Umgelegt Zugeteilt"""
ActiveChart.SeriesCollection(5).Name = "=""Gehalten"""
ActiveChart.SeriesCollection(6).Name = "=""extern Gehend"""
ActiveChart.SeriesCollection(7).Name = "=""Intern"""
End Sub