View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
MIKE215 MIKE215 is offline
external usenet poster
 
Posts: 32
Default Align y-axes on charts



"MikeCM" wrote:

I have a nuimber of sets of 3 charts, with each trio being linked but
differing quantities. The y-axis scales in each of the 3 charts are
automatic and hence do not align, which prevents easy cross-review.
Does anyone have any suggestions that will look at the first chart
maximum value on the y-axis and apply this maximum to the scale of the
other 2 charts? Thanks for any suggestions.;



Hi Mike,

Try this. It will copy the entire format of chart 1 not just the max and
min on the axis. Just make sure to check your titles after this.

Sub ChartMatch()
Dim cobj As ChartObject
ActiveSheet.ChartObjects(1).Activate
ActiveChart.ChartArea.Select
ActiveChart.ChartArea.Copy

For Each cobj In ActiveSheet.ChartObjects
cobj.Activate
ActiveChart.ChartArea.Select
ActiveChart.Paste Type:=xlFormats
Next
ActiveChart.Deselect
Set cobj = Nothing
End Sub

Regards,
Mike