I need to format the font of the title of the axis on a chart.
I'm using the following code:
with ActiveChart.Axes(xlCategory).AxisTitle
.AutoScaleFont = True
.Font.Name = "Verdana"
.Font.FontStyle = "Negrito"
.Font.Size = 7
end with
When I'm debugging the program, everything works, but when the program is running, the instruction ".Font.Size = 7" doesn't work. It only works if I type, for example, ".Font.Size = .Font.Size * 7 / 4.5", but sometimes I want to set it 7 and it doesn't equal 4.5 previously.
I only want to set a constant size.
Does anyone understand what is happening?
I'm using the following code:
with ActiveChart.Axes(xlCategory).AxisTitle
.AutoScaleFont = True
.Font.Name = "Verdana"
.Font.FontStyle = "Negrito"
.Font.Size = 7
end with
When I'm debugging the program, everything works, but when the program is running, the instruction ".Font.Size = 7" doesn't work. It only works if I type, for example, ".Font.Size = .Font.Size * 7 / 4.5", but sometimes I want to set it 7 and it doesn't equal 4.5 previously.
I only want to set a constant size.
Does anyone understand what is happening?