PC Review


Reply
Thread Tools Rate Thread

Changing the font size in the charts

 
 
navin
Guest
Posts: n/a
 
      13th Apr 2007
Hi,

In a spreadsheet i have, some 20 charts along with the data. I have to
reduce the font size for the x and y axis and the title. For one chart
i can use the active chart method to achieve.

Please tell me, how i can loop through all the charts in the sheets
and reduce the fonts.

Please help.

Thanks,
Navin

 
Reply With Quote
 
 
 
 
=?Utf-8?B?VmVyZ2VsIEFkcmlhbm8=?=
Guest
Posts: n/a
 
      13th Apr 2007
Navin,

Maybe something like this. It sets the font size of tick labels and axis
titles to 8.

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
With cht.Axes(xlValue)
.TickLabels.Font.Size = 8
.AxisTitle.Font.Size = 8
End With
Next chtObject
Next sht


--
Hope that helps.

Vergel Adriano


"navin" wrote:

> Hi,
>
> In a spreadsheet i have, some 20 charts along with the data. I have to
> reduce the font size for the x and y axis and the title. For one chart
> i can use the active chart method to achieve.
>
> Please tell me, how i can loop through all the charts in the sheets
> and reduce the fonts.
>
> Please help.
>
> Thanks,
> Navin
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Font color based on font type or size John Microsoft Excel Misc 2 7th Feb 2008 12:50 AM
Combo Box font size in Charts Shirley Munro Microsoft Excel Charting 0 27th Oct 2005 12:38 PM
set datalabel font size for all charts in a row Marie J-son Microsoft Excel Charting 1 19th Nov 2004 05:44 AM
set datalabel font size for all charts in a row Marie J-son Microsoft Excel Programming 1 19th Nov 2004 03:18 AM
charts changing font and size Peg Microsoft Powerpoint 1 27th Jan 2004 03:48 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:31 PM.