Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Unable to click on charts & unable to create any new charts Excel | Charts and Charting in Excel | |||
link excel charts to web pages and update charts automatically | Charts and Charting in Excel | |||
Charts - How to have multiple charts share a legend. | Charts and Charting in Excel | |||
Matching the colors Column Charts and Pie Charts | Charts and Charting in Excel | |||
URGENT - NEED PRO EXCEL PROGRAMMER - TO AUTOMATICALLY CHANGE TITLES IN EXCEL CHARTS | Excel Programming |