View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.charting
[email protected] lukehalonen@gmail.com is offline
external usenet poster
 
Posts: 1
Default How do I change the X axis scale on all charts in a workbook?

This only affects the chart object within the active sheet, for me. How would I modify it to work with all charts in the workbook? I have 60+ charts I would like to update...

I am currently trying to use:

---
Sub FormatYAxis()
For Each Sht In ActiveWorkbook.Sheets
For Each ChtObj In Sht.ChartObjects
With ChtObj.Chart

' Category (Y) Axis
With .Axes(xlValue)
.MinimumScale = Range("B11").Value
.MaximumScale = Range("B12").Value
.MinorUnit = Range("B13").Value
.MajorUnit = Range("B14").Value
End With
End With
Next
Next
End Sub