Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default excel charts

Hi,

Does anyone have a code snippet that for multiple charts on a worksheet,
forces the Chart Area and Plot Area to be the same across each chart?

Thanks,

Travis
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default excel charts

This requires you to supply the parameters: name of the sheet where the
charts are, desired width of the chart area, desired height, left offset of
the plot area (distance from left edge of chart area), top offset, width and
height of the plot area.

If you don't want to have to figure the parameters you could modify the code
to read the values from one of the charts.

Public Sub MakeSame(SheetName As String, CWidth As Double, CHeight As
Double, PLeft As Double, PTop As Double, PWidth As Double, PHeight As Double)

Dim CO As ChartObject

For Each CO In Sheets(SheetName).ChartObjects
CO.Width = CWidth
CO.Height = CHeight
With CO.Chart
.PlotArea.Left = PLeft
.PlotArea.Top = PTop
.PlotArea.Width = PWidth
.PlotArea.Height = PHeight
End With
Next CO

End Sub


"Travis" wrote:

Hi,

Does anyone have a code snippet that for multiple charts on a worksheet,
forces the Chart Area and Plot Area to be the same across each chart?

Thanks,

Travis

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
Unable to click on charts & unable to create any new charts Excel Snapclick Charts and Charting in Excel 4 February 1st 09 07:59 PM
link excel charts to web pages and update charts automatically Signguy Charts and Charting in Excel 1 April 22nd 08 08:29 PM
Charts - How to have multiple charts share a legend. Sean Charts and Charting in Excel 2 November 20th 07 04:49 AM
Matching the colors Column Charts and Pie Charts RohanSewgobind Charts and Charting in Excel 3 April 21st 06 09:35 PM
URGENT - NEED PRO EXCEL PROGRAMMER - TO AUTOMATICALLY CHANGE TITLES IN EXCEL CHARTS Marcello do Guzman Excel Programming 2 October 7th 03 05:11 PM


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