pbinvestor
New Member
- Joined
- Apr 14, 2002
- Messages
- 19
I use the following routine to scale a chart the way I want to display it
The routine that I "borrowed" however operates on all chart objects in the worksheet.
How do I change the code to only operate on "Chart 6" but leave other charts untouched.
Thanks in advance.
Sub Format_charts()
Dim objCht As ChartObject
For Each objCht In ActiveSheet.ChartObjects
With objCht.Chart
With .Axes(xlValue)
.MaximumScale = ActiveSheet.Range("v18").Value
.MinimumScale = ActiveSheet.Range("u18").Value
' .MajorUnit = ActiveSheet.Range("Unit").Value
End With
End With
Next objCht
End Sub
The routine that I "borrowed" however operates on all chart objects in the worksheet.
How do I change the code to only operate on "Chart 6" but leave other charts untouched.
Thanks in advance.
Sub Format_charts()
Dim objCht As ChartObject
For Each objCht In ActiveSheet.ChartObjects
With objCht.Chart
With .Axes(xlValue)
.MaximumScale = ActiveSheet.Range("v18").Value
.MinimumScale = ActiveSheet.Range("u18").Value
' .MajorUnit = ActiveSheet.Range("Unit").Value
End With
End With
Next objCht
End Sub