Hi,
I am working on a task where I should fill in some data in an excel workbook (using .NET) and the existing chart objects would draw line graphs based on the given data. Unfortunately, a macro in the workbook throws an error "Unable to set MinimumScaleIsAuto property of Axis class"
.
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.Axes(xlCategory).Select
With ActiveChart.Axes(xlCategory)
.MinimumScaleIsAuto = True
.MaximumScaleIsAuto = True
.BaseUnitIsAuto = True
.MajorUnit = 2
.MajorUnitScale = xlMonths
.MinorUnitIsAuto = True
.Crosses = xlAutomatic
.AxisBetweenCategories = False
.ReversePlotOrder = False
End With
I am a newbie to VBA, Excel charting and the original author of the excel file is not around. But since the excel file is in use since quite sometime (with users filling data manually), I doubt if I am doing something wrong with the automated data entry.
The X-axis is plotted with dates and the Y-axis with some floating point values.
This error has been bugging me since quite sometime and I am stuck. Can anybody please please help me out?