AW: Mit CommandButton Diagram Schließen
18.02.2006 09:32:05
Kruemel
Ja genau, ich möchte das Diagram das über den button gestaret wurde wieder mit einem anderen button löschen. Viel Code gibt es da ja nicht, oder ist der für das diagram auch wichtig?
Private Sub
CommandButton_Click()
DidvidendKruemel
End Sub
______________________________________________________________________________________
Private Sub
CommandButton_DblKlick()
? 'Diagramm "DividendKruemel schließen?
End Sub
_______________________________________________________________________________________
Sub DividendKruemel()
' DividendJens Makro
' Makro am 18.02.06 von Kruemel aufgezeichnet
Charts.Add
ActiveChart.ChartType = xlLine
ActiveChart.SetSourceData Source:=Sheets("Deka").Range("J3:J6"), PlotBy:= _
xlColumns
ActiveChart.SeriesCollection(1).XValues = "=Deka!R3C11:R6C11"
ActiveChart.SeriesCollection(1).Name = "=""DividendValue"""
ActiveChart.Location Where:=xlLocationAsObject, Name:="Deka"
With ActiveChart.Axes(xlCategory)
.HasMajorGridlines = False
.HasMinorGridlines = False
End With
With ActiveChart.Axes(xlValue)
.HasMajorGridlines = False
.HasMinorGridlines = False
End With
ActiveChart.HasLegend = False
ActiveChart.HasDataTable = False
ActiveChart.Axes(xlCategory).Select
With ActiveChart.Axes(xlCategory)
.MinimumScaleIsAuto = True
.MaximumScaleIsAuto = True
.BaseUnitIsAuto = True
.MajorUnitIsAuto = True
.MinorUnitIsAuto = True
.Crosses = xlAutomatic
.AxisBetweenCategories = True
.ReversePlotOrder = False
End With
With ActiveChart.Axes(xlCategory)
.MinimumScaleIsAuto = True
.MaximumScaleIsAuto = True
.BaseUnitIsAuto = True
.MajorUnit = 7
.MajorUnitScale = xlDays
.MinorUnitIsAuto = True
.Crosses = xlAutomatic
.AxisBetweenCategories = True
.ReversePlotOrder = False
End With
Selection.TickLabels.NumberFormat = "[$-407]d/ mmm/ yy;@"
ActiveChart.Axes(xlValue).Select
With ActiveChart.Axes(xlValue)
.MinimumScaleIsAuto = True
.MaximumScaleIsAuto = True
.MinorUnitIsAuto = True
.MajorUnit = 50
.Crosses = xlAutomatic
.ReversePlotOrder = False
.ScaleType = xlLinear
.DisplayUnit = xlNone
End With
Selection.TickLabels.NumberFormat = "#,##0 $"
ActiveChart.ChartArea.Select
End Sub