LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Chart font

Hi,

i have some 20 charts in a sheet along with the data. I want to change
the fonts of all the charts i.e. title, axis etc. i was able to do
this but some of my charts also have secondary axis and font for the
secondary is not changing.

How to achieve this. I used below code to achieve. Please tell where i
am wrong.

Sub Test()
Dim sht As Worksheet
Dim chtObject As ChartObject
Dim cht As Chart



For Each sht In Worksheets
For Each chtObject In sht.ChartObjects
Set cht = chtObject.Chart
''With cht.Axes(xlCategory)
' .TickLabels.Font.Size = 8
' .AxisTitle.Font.Size = 8
' End With
'On Error Resume Next
For Each a In cht.Axes
With cht.Axes(xlValue)
.TickLabels.Font.Size = 8
.AxisTitle.Font.Size = 8
End With

Next a
With cht.DataTable
.Font.Size = 8
End With
With cht.ChartTitle
.Font.Size = 8
End With
Next chtObject
End Sub

Thanks for the help in advance.

Navin

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
format chart textbox font Kim Jackson Charts and Charting in Excel 2 January 9th 09 09:24 PM
2007 Chart font fashionroadkill Charts and Charting in Excel 0 November 6th 08 12:01 AM
Font Size in Chart Title Bill[_30_] Excel Programming 1 July 14th 06 04:06 PM
symbol font in chart doesn't appear Khoshravan Charts and Charting in Excel 6 June 19th 06 02:01 PM
xl chart font sizing into PPT Brian Reilly, MS MVP Charts and Charting in Excel 1 January 12th 05 02:58 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"