kmbryant09
New Member
- Joined
- Feb 16, 2021
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
I have a Chart ("Chart 3") that has some basic VBA code attached to it to set the Y-Axis Min & Max values based on specific cells:
ActiveSheet.ChartObjects("Chart 3").Chart.Axes(xlValue).MaximumScale = Range("CB1").Value
ActiveSheet.ChartObjects("Chart 3").Chart.Axes(xlValue).MinimumScale = Range("CB2").Value
I'm trying to also add VBA to set the Y-Axis Major Unit to cell CB3. I've tried the following code, but get an error when running the Macro:
ActiveSheet.ChartObjects("Chart 3").Chart.Axes(xlValue).MajorUnit = Range("CB3").Value
Any help?
Thanks!
ActiveSheet.ChartObjects("Chart 3").Chart.Axes(xlValue).MaximumScale = Range("CB1").Value
ActiveSheet.ChartObjects("Chart 3").Chart.Axes(xlValue).MinimumScale = Range("CB2").Value
I'm trying to also add VBA to set the Y-Axis Major Unit to cell CB3. I've tried the following code, but get an error when running the Macro:
ActiveSheet.ChartObjects("Chart 3").Chart.Axes(xlValue).MajorUnit = Range("CB3").Value
Any help?
Thanks!