Private Sub Worksheet_Change(ByVal Target As Range)
With ActiveSheet.ChartObjects("Chart 1").Chart
Select Case Target.Address
Case Is = [I53].Address
.Axes(xlCategory).MaximumScale = Target.Value
Case Is = [E53].Address
.Axes(xlCategory).MinimumScale = Target.Value
Case Is = [P47].Address
.Axes(xlCategory).MajorUnit = Target.Value
Case Is = [G46].Address
.Axes(xlValue).MaximumScale = Target.Value
Case Is = [G47].Address
.Axes(xlValue).MinimumScale = Target.Value
Case Is = [P46].Address
.Axes(xlValue).MajorUnit = Target.Value
End Select
End With
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
With ActiveSheet.ChartObjects("Chart 1").Chart
Select Case Target.Address(0, 0)
Case "A1", "A2"
.Axes(xlCategory).MaximumScale = [I53].Value
Case "E53"
.Axes(xlCategory).MinimumScale = Target.Value
Case Is = "P47"
.Axes(xlCategory).MajorUnit = Target.Value
Case Is = "G46"
.Axes(xlValue).MaximumScale = Target.Value
Case Is = "G47"
.Axes(xlValue).MinimumScale = Target.Value
Case "P46"
.Axes(xlValue).MajorUnit = Target.Value
End Select
End With
End Sub
VBA/HTML-CodeConverter, AddIn für Office 2002-2016 - in VBA geschrieben von Lukas Mosimann. Projektbetreuung:RMH Software & Media
Code erstellt und getestet in Office 16 - mit VBAHTML 12.6.0
Gruß von Luschi
Private Sub Worksheet_Change(ByVal Target As Range)
With ActiveSheet.ChartObjects("Chart 1").Chart
Select Case Target.Address
Case Is = [I53].Address
.Axes(xlCategory).MaximumScale = Target.Value
Case Is = [E53].Address
.Axes(xlCategory).MinimumScale = Target.Value
Case Is = [P47].Address
.Axes(xlCategory).MajorUnit = Target.Value
Case Is = [G46].Address
.Axes(xlValue).MaximumScale = Target.Value
Case Is = [G47].Address
.Axes(xlValue).MinimumScale = Target.Value
Case Is = [P46].Address
.Axes(xlValue).MajorUnit = Target.Value
End Select
End With
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
With ActiveSheet.ChartObjects("Chart 1").Chart
Select Case Target.Address(0, 0)
Case "A1", "A2"
.Axes(xlCategory).MaximumScale = [I53].Value
Case "E53"
.Axes(xlCategory).MinimumScale = Target.Value
Case Is = "P47"
.Axes(xlCategory).MajorUnit = Target.Value
Case Is = "G46"
.Axes(xlValue).MaximumScale = Target.Value
Case Is = "G47"
.Axes(xlValue).MinimumScale = Target.Value
Case "P46"
.Axes(xlValue).MajorUnit = Target.Value
End Select
End With
End Sub
VBA/HTML-CodeConverter, AddIn für Office 2002-2016 - in VBA geschrieben von Lukas Mosimann. Projektbetreuung:RMH Software & Media
Code erstellt und getestet in Office 16 - mit VBAHTML 12.6.0
Gruß von Luschi