I have a form that allows the user to change the Yaxis. each sheet has a different chart. I have one sheet that is just the data.
I have the code working except for one part. I know there has to be a way to do this so I dont have to add the code for every new chart sheet. This is what I have so far and it works.
Private Sub Yaxis_Click()
Sheets("Clean").Select
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.Axes(xlValue).MinimumScale = minyaxis.Value
ActiveChart.Axes(xlValue).MaximumScale = maxyaxis.Value
ActiveChart.Axes(xlValue).MajorUnit = increment.Value
Sheets("sheet1").Select
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.Axes(xlValue).MinimumScale = minyaxis.Value
ActiveChart.Axes(xlValue).MaximumScale = maxyaxis.Value
ActiveChart.Axes(xlValue).MajorUnit = increment.Value
How would I re-write this so it updates all the charts without me having to come and change the code for every chart?
Thanks
Bookmarks