roc_on_the_rocks
Board Regular
- Joined
- Jun 6, 2009
- Messages
- 175
- Office Version
- 365
- Platform
- Windows
I’m facing an unexpected problem positioning the legend on a scatter plot chart (Excel 2007).
Once the chart is plotted (through VBA), the left side of the chart legend overlaps with secondary Y-axi labels. So I’ve been trying to move the chart legend further to the right, against the chart area border.
My surprise is that when moving the chart legend with VBA code, I cannot get it closer than about 3/8 inch between the legend and chart border. But if I manually move it, I can get it touching the right-side area border.
An alternative to resolve the overlapping issue is to make the actual plot area smaller (narrower), but I’m avoiding that because the smaller plot area makes is harder to read it.
Any help will be greatly appreciated. Thanks in advance!
Once the chart is plotted (through VBA), the left side of the chart legend overlaps with secondary Y-axi labels. So I’ve been trying to move the chart legend further to the right, against the chart area border.
My surprise is that when moving the chart legend with VBA code, I cannot get it closer than about 3/8 inch between the legend and chart border. But if I manually move it, I can get it touching the right-side area border.
Code:
ActiveChart.Legend.Left = 500
ActiveChart.Legend.Width = 150
Any help will be greatly appreciated. Thanks in advance!