View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.charting
Matt McQueen Matt McQueen is offline
external usenet poster
 
Posts: 23
Default ChartArea.left reporting incorrectly?

Folks,

A few moons ago I posted this query:

http://www.pcreview.co.uk/forums/thread-3767566.php

Eric/egun's response allowed me to accomplish what I was after using the code:

..Parent.Left = xLoc - ActiveChart.ChartArea.Left -
ActiveChart.PlotArea.InsideLeft

However I've now run into an issue whereby the activechart.chartarea.left
report is incorrect. After creating 9 plots with .chartarea.left = 3, it then
produces two plots with .chartarea.left = 118. Since my goal is to align my
primary y-axis to the right-hand edge of column B, this poses a problem. The
effective code becomes:

..Parent.Left = 96 - 118 - ActiveChart.PlotArea.InsideLeft

which is less than zero. The chart is still created, just shifted to the far
left of the screen.

Interestingly, if I break the code and step through - voila, no problem!

Anybody seen this one before?

Cheers,

Matt