I ran the following code from the microsoft solution page to no avail. The Message box indicated that 149 charts were altered, but the infamous "no new fonts may be applied" message came up first thing on attempt to work in the file. The problem continued in much the same way a couple days previous when I applied John Peltier's code solution; though, that was my first experience applying VBA code, and I might have interposed some erroneous mouse clicks. Anyway, is 149 charts beyond fixing with this sort of VBA solution? How can I fix disable autoscaling in the file, and then continue to build and use the file?
Thank you for any suggestions.
Sub AutoScale_Off()
Dim ws As Worksheet, co As ChartObject, i As Integer
Dim ch As Chart
For Each ws In ActiveWorkbook.Worksheets
' Go through each worksheet in the workbook
For Each co In ws.ChartObjects
'In each chart turn the Auto Scale font feature off
i = i + 1
co.Chart.ChartArea.AutoScaleFont = False
Next co
Next ws
For Each ch In ActiveWorkbook.Charts
'Go through each chart in the workbook
ch.ChartArea.AutoScaleFont = False
i = i + 1
Next
MsgBox i & " charts have been altered"
Application.DisplayAlerts = True
End Sub
Thank you for any suggestions.
Sub AutoScale_Off()
Dim ws As Worksheet, co As ChartObject, i As Integer
Dim ch As Chart
For Each ws In ActiveWorkbook.Worksheets
' Go through each worksheet in the workbook
For Each co In ws.ChartObjects
'In each chart turn the Auto Scale font feature off
i = i + 1
co.Chart.ChartArea.AutoScaleFont = False
Next co
Next ws
For Each ch In ActiveWorkbook.Charts
'Go through each chart in the workbook
ch.ChartArea.AutoScaleFont = False
i = i + 1
Next
MsgBox i & " charts have been altered"
Application.DisplayAlerts = True
End Sub