I am trying to use vba to set the Yaxis Max, Min and Major Units for a dynamic line chart. The chart changes based on user selections from a data validation cell.
I am using this code
But when I run it the plot area moves around inside the chart area and the chart area resizes.
After looking around for a solution, I tried “locking” the axis font autoscale like this.
This caused everything to move around but didn’t really fix the problem.
So I tried setting values for the Chart and plot areas like this…
But it doesn’t fix the issue.
All I want to do is set the Yaxis Max, Min and Major unit based on a calculation I am doing on the data. But when I apply it, it seems to change a lot of other settings on the chart. The more things I try to fix it, The more confused I get about what’s helping and what’s hurting. Anyone have any insight on this issue?
Thanks
Bookmarks