PC Review


Reply
Thread Tools Rate Thread

how to change font size of datalabels of two charts in a sheet

 
 
amrezzat
Guest
Posts: n/a
 
      8th May 2006

hey guys
i have two charts in a sheet
how to change the font size and AutoScaleFont of datalabels in them
through VBA??


--
amrezzat
------------------------------------------------------------------------
amrezzat's Profile: http://www.excelforum.com/member.php...o&userid=28766
View this thread: http://www.excelforum.com/showthread...hreadid=540051

 
Reply With Quote
 
 
 
 
Jon Peltier
Guest
Posts: n/a
 
      9th May 2006
The required syntax is discoverable using the macro recorder. The final
result would look something like this:

For Each chtob In ActiveSheet.ChartObjects
For Each srs In chtob.Chart.SeriesCollection
If srs.HasDataLabels Then
srs.DataLabels.Font.Size = 8
srs.DataLabels.AutoScaleFont = False
End If
Next
Next

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

"amrezzat" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
>
> hey guys
> i have two charts in a sheet
> how to change the font size and AutoScaleFont of datalabels in them
> through VBA??
>
> --
> amrezzat



 
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
Change Font Size on Multiple Charts at the same time JessM Microsoft Excel Charting 1 3rd Oct 2009 08:46 AM
How do I change the font size inside a sheet tab? rgranell Microsoft Excel Worksheet Functions 2 16th Dec 2008 07:15 PM
Change font size of header on every sheet? FJ Microsoft Excel Programming 4 12th May 2008 09:41 AM
how to change font size of datalabels of two charts in a sheet amrezzat Microsoft Excel Programming 1 9th May 2006 01:11 AM
Change font size on sheet tabs Gavin Microsoft Excel Misc 1 13th Jun 2005 07:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:33 PM.