Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA to set the font size for the axes of a bar chart
I trying to set the font size on the axes of a horizontal stacked bar
chart (Excel 2010). When I try to run the code created by the macro recorder I get an error message: Method of 'TextFrame2' of object 'ChartFormat' failed Here is the offending code: ActiveChart.Axes(xlValue).Select Selection.Format.TextFrame2.TextRange.Font.Size = 10 Can anyone tell me how to set the font size of the chart axes with VBA please? Any help would be greatly appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA to set the font size for the axes of a bar chart
On Sep 6, 8:08*pm, Harry Flashman wrote:
I trying to set the font size on the axes of a horizontal stacked bar chart (Excel 2010). When I try to run the code created by the macro recorder I get an error message: Method of 'TextFrame2' of object 'ChartFormat' failed Here is the offending code: ActiveChart.Axes(xlValue).Select * * Selection.Format.TextFrame2.TextRange.Font.Size = 10 Can anyone tell me how to set the font size of the chart axes with VBA please? Any help would be greatly appreciated. Okay I am an idiot. After struggling with this problem for over an hour I post here and then exactly 2 minutes later I figure it out. ActiveChart.Axes(xlValue).TickLabels.Font.Size = 10 ActiveChart.Axes(xlCategory).TickLabels.Font.Size = 8 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Chart series legend font size keeps shrinking - how to stop it? | Charts and Charting in Excel | |||
Changing font style/size/color/etc for multiple series in a chart? | Charts and Charting in Excel | |||
changing font size of chart title | Excel Programming | |||
really weird behavior, chart with textbox font size problem | Excel Programming | |||
Font Size in Chart Title | Excel Programming |