Zeichenfläche wird nicht immer richtig formatiert
29.01.2004 21:14:47
Hagra
Wer kann mir helfen? Die Probleme entstehen am Ende des Makros: PlotArea, ChartArea - denn die ChartArea wird eben manchmal nicht ausgeführt.
Hagra
Sub Kreis_diag(Zelle, Start, Eingabe)
Charts.Add
ActiveChart.ChartType = xlPie
ActiveChart.SetSourceData Source:=Sheets("Farbe dE").Range(Eingabe), _
PlotBy:=xlRows
ActiveChart.Location Where:=xlLocationAsNewSheet
ActiveChart.HasLegend = False
Selection.Shadow = False
Selection.Interior.ColorIndex = xlNone
ActiveChart.SeriesCollection(1).Select
ActiveChart.PlotArea.Select
With Selection.Border
.Weight = xlHairline
.LineStyle = xlNone
End With
Selection.Interior.ColorIndex = xlNone
ActiveChart.SeriesCollection(1).Select
ActiveChart.SeriesCollection(1).Points(2).Select
ActiveChart.SeriesCollection(1).Points(1).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlAutomatic
End With
Selection.Shadow = False
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
End With
With Selection.Border
.Weight = xlThin
.LineStyle = xlAutomatic
End With
Selection.Shadow = False
With Selection.Interior
.ColorIndex = 4
.Pattern = xlSolid
End With
ActiveChart.SeriesCollection(1).Points(2).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlAutomatic
End With
Selection.Shadow = False
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
End With
ActiveChart.Location Where:=xlLocationAsObject, Name:="Farbe dE"
Diag = ActiveChart.Name
Diag = Mid(Diag, Start)
With ActiveSheet.Shapes(Diag)
.Width = 63
.Height = 48
.Left = Range(Zelle).Left
.Top = Range(Zelle).Top
End With
With ActiveChart.PlotArea
.Top = 0
.Left = 7
.Width = 43
.Height = 42
End With
ActiveChart.ChartArea.Select
With Selection.Border
.Weight = 2
.LineStyle = 0
End With
End Sub