Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Looping through to stop on pie charts

Could someone please tell me how to loop through a
workbook and make the font of pie charts 8pt (and only
pie charts)?

Thanks in advance

Daniel
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 115
Default Looping through to stop on pie charts

Daniel -

Your macro should look like this:

Sub PieChartFonts8pt()
Dim sh As Object
Dim ch As Chart
Dim cho As ChartObject

' Get Chart Sheets
For Each ch In ActiveWorkbook.Charts
Select Case ch.ChartType
Case xlPie, xlPieExploded, xl3DPie, xl3DPieExploded
ch.ChartArea.Font.Size = 8
End Select
Next

' Get Embedded Charts
For Each sh In ActiveWorkbook.Sheets
For Each cho In sh.ChartObjects
Select Case cho.Chart.ChartType
Case xlPie, xlPieExploded, xl3DPie, xl3DPieExploded
cho.Chart.ChartArea.Font.Size = 8
End Select
Next
Next
End Sub

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


Daniel Bonallack wrote:

Could someone please tell me how to loop through a
workbook and make the font of pie charts 8pt (and only
pie charts)?

Thanks in advance

Daniel


Reply
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
Stop-action charts Gene Charts and Charting in Excel 1 June 1st 09 11:38 AM
Stop Charts from Rendering PJFry Charts and Charting in Excel 2 May 12th 09 05:05 PM
stop looping and comments on VBA shaharul[_9_] Excel Programming 3 May 27th 04 03:07 AM
Looping Through Charts Mike Waldron[_2_] Excel Programming 1 May 21st 04 06:21 PM
Looping Through Charts No Name Excel Programming 1 May 20th 04 10:36 PM


All times are GMT +1. The time now is 11:52 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"