ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   error with chart object (https://www.excelbanter.com/excel-programming/420384-error-chart-object.html)

tom

error with chart object
 
I have a bunch of charts embedded in a worksheet and I am trying to change
the font size on the axis using vb.

My code is:


For iChart = 1 To nCharts

With ActiveSheet.ChartObjects(iChart).Axes(xlCategory)
..TickLabels.AutoScaleFont.Size = 9
End With

However I get an error: object does not support this property or method

JLGWhiz

error with chart object
 
It is probably the AutoScaleFont property that threw the error. It is
normally used with Boolean value of True or False. Try using just Font.

"Tom" wrote:

I have a bunch of charts embedded in a worksheet and I am trying to change
the font size on the axis using vb.

My code is:


For iChart = 1 To nCharts

With ActiveSheet.ChartObjects(iChart).Axes(xlCategory)
.TickLabels.AutoScaleFont.Size = 9
End With

However I get an error: object does not support this property or method



All times are GMT +1. The time now is 07:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com