ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   changing font size of chart title (https://www.excelbanter.com/excel-programming/410165-changing-font-size-chart-title.html)

Kathl

changing font size of chart title
 
We are trying to change the font size of the chart size automatically via vba
and have included this:

ActiveChart.ChartTitle.Select

With Selection.Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With

For this code the program doesn't change the formatting of the chart title.
Perhaps you can find the fault...



Bob Phillips

changing font size of chart title
 
It works fine here, although you don't need to select something already
selected

With ActiveChart.ChartTitle
With .Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
End With


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Kathl" wrote in message
...
We are trying to change the font size of the chart size automatically via
vba
and have included this:

ActiveChart.ChartTitle.Select

With Selection.Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With

For this code the program doesn't change the formatting of the chart
title.
Perhaps you can find the fault...





Kathl

changing font size of chart title
 
Yeah, thx.

when i delete all this select statements everything's working fine.

"Bob Phillips" wrote:

It works fine here, although you don't need to select something already
selected

With ActiveChart.ChartTitle
With .Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
End With


--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Kathl" wrote in message
...
We are trying to change the font size of the chart size automatically via
vba
and have included this:

ActiveChart.ChartTitle.Select

With Selection.Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With

For this code the program doesn't change the formatting of the chart
title.
Perhaps you can find the fault...







All times are GMT +1. The time now is 10:20 PM.

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