Mark_Hewitt
New Member
- Joined
- Mar 9, 2015
- Messages
- 3
Hi folks.
I posted this before but got no replies so I’m simplifying to see if I get more luck.
I have 4 sheets (A,B,C,D) each with 4 charts (renamed Chart1, Chart2 etc)
I want to change the scales (in my code these will differ) but for this purpose can you let me know why this doesn’t work and what possible adjustments I could make?
Thanks
Mark
Dim Array_cnt, Cnt As Integer, Report_WB As Workbook, Report_WS As Worksheet, Sheet_names() As Variant
Sheet_names() = Array("A", "B", "C", "D")
For Array_cnt = 0 To 3
I posted this before but got no replies so I’m simplifying to see if I get more luck.

I have 4 sheets (A,B,C,D) each with 4 charts (renamed Chart1, Chart2 etc)
I want to change the scales (in my code these will differ) but for this purpose can you let me know why this doesn’t work and what possible adjustments I could make?
Thanks
Mark
Dim Array_cnt, Cnt As Integer, Report_WB As Workbook, Report_WS As Worksheet, Sheet_names() As Variant
Sheet_names() = Array("A", "B", "C", "D")
For Array_cnt = 0 To 3
Set Report_WS = Report_WB.Worksheets(Sheet_names(Array_cnt))
For Cnt = 1 To 4
ActiveSheet.ChartObjects("Chart" & Cnt).Activate ' <-- This seems to halt the execution
ActiveChart.Axes(xlValue).MaximumScale = 100
ActiveChart.Axes(xlValue).MinimumScale = 0
ActiveChart.Axes(xlValue).MaximumScale = 100
ActiveChart.Axes(xlValue).MinimumScale = 0
Next
Next