LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default programically refresh pivot chart formatting

thank you for your time - your right it is a start now I am off to study it.
I am a light weight but learning I am following ing what I am reading.

I know how to request more then I can write.

Again thank you - this is a good base line

"William" wrote:

Hi Todd

This may help a little...

Sub PivotChartFormat()
Dim ch As Chart, i As Long
On Error Resume Next
Application.ScreenUpdating = False
Application.EnableEvents = False

For Each ch In ActiveWorkbook.Charts
With ch
..SizeWithWindow = True
..ChartArea.AutoScaleFont = True
..ChartType = xlColumnStacked
..HasTitle = False
..HasLegend = True

With .ChartArea
With .Font
..Name = "Tahoma"
..Size = 10
End With
..AutoScaleFont = False
End With

With .PlotArea
With .Border
..ColorIndex = 16
..Weight = xlThin
..LineStyle = xlContinuous
End With
..Fill.TwoColorGradient Style:=msoGradientHorizontal, Variant:=4
..Fill.Visible = True
..Fill.ForeColor.SchemeColor = 4
..Fill.BackColor.SchemeColor = 1
End With

With .Axes(xlCategory)
..MajorTickMark = xlOutside
..MinorTickMark = xlNone
..TickLabelPosition = xlLow
..Border.LineStyle = xlNone
With .TickLabels
..Alignment = xlCenter
..Offset = 100
..AutoScaleFont = False
End With
End With

With .Axes(xlValue)
With .MajorGridlines
With .Border
..ColorIndex = 57
..Weight = xlHairline
..LineStyle = xlDot
End With
End With
With .TickLabels
..AutoScaleFont = False
..Font.Bold = False
..NumberFormat = "#,##0 ;[Red](#,##0)"
End With
End With

For i = 1 To .SeriesCollection.Count
With .SeriesCollection(i)
..Border.LineStyle = xlNone
..ApplyDataLabels AutoText:=True, ShowValue:=True
..DataLabels.Font.ColorIndex = 2
..DataLabels.Font.Bold = True
End With
Next i

For i = 1 To .ChartGroups.Count
With .ChartGroups(i)
..Overlap = 100
..GapWidth = 25
..HasSeriesLines = False
End With
Next i

..Legend.Position = xlTop
..HasDataTable = True
..DataTable.AutoScaleFont = False
..DataTable.Font.Bold = False
..DataTable.Font.Size = 10
End With

Next ch

Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub



--

Regards

William

XL2003




"Todd F." wrote in message
...
|I am beginningt o embrace pivot charts for faster automated reports.
Problem-
| when you refresh pivots or data the chart wipes my colors and most
important
| the dtata point values.
|
| So I must run through massive reports fixing many charts.
|
| How would one approach automating a charts setting - do you build a macro
to
| work on active sheet or Ative Chart , for like charts can you tell it to
fix
| multiple sheets.
|
| I woul dbe happy with soemhting affective that woul dneed to be activated
on
| the active chart - it would still save a great deal of time.
|
| Thanks for your help and suggestions or examples would be appreciated.
|
| Todd



 
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
Pivot Chart won't refresh! srpd Charts and Charting in Excel 3 January 26th 10 03:28 PM
refresh pivot chart Souris Charts and Charting in Excel 1 January 15th 08 12:08 AM
Pivot Chart Refresh cancels all chart formatting Nico[_2_] Charts and Charting in Excel 2 September 9th 07 05:22 AM
Maintain pivot table formatting after refresh dan Excel Discussion (Misc queries) 0 January 10th 07 03:09 PM
formatting on a pivot report refresh Kathie Excel Discussion (Misc queries) 2 January 24th 06 07:58 PM


All times are GMT +1. The time now is 01:45 AM.

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"