I want to add some vertical lines to an Excel chart, so I started off by finding the dimensions of the chart and plot area, using the following:
ActiveChart.ChartArea.Select
L = ActiveSheet.Shapes(MyChart).Left
T = ActiveSheet.Shapes(MyChart).Top
W = ActiveSheet.Shapes(MyChart).Width
H = ActiveSheet.Shapes(MyChart).Height
ActiveChart.PlotArea.Select
PL = ActiveChart.PlotArea.Left
PT = ActiveChart.PlotArea.Top
PW = ActiveChart.PlotArea.Width
PH = ActiveChart.PlotArea.Height
My problem is with the PlotArea.Left -- If I relocate the plot area to the far left, I get a value of 0, which is the left edge of the Y-axis scale. The actual plot area is further to the right.
How do I find the left edge of the actual plot area?
Bookmarks