Hi,
this line of code is giving me a method of axes failed error msg.
Can anyone fix it?

.Axes(xlCategory, xlSecondary).CategoryType = xlCategoryScale

Below is the code that is before the above line:

With ActiveChart
.ChartType = xlLineMarkers
.SeriesCollection.NewSeries
'.SeriesCollection(1).AxisGroup = 2
'.SeriesCollection(2).AxisGroup = 2
.HasLegend = True
.Legend.Position = xlRight
.Axes(xlCategory).MinorTickMark = xlOutside
.Axes(xlValue).MinorTickMark = xlOutside

.ChartArea.Select
.HasAxis(xlCategory, xlPrimary) = True
.HasAxis(xlCategory, xlSecondary) = True
.HasAxis(xlValue, xlPrimary) = True
.HasAxis(xlValue, xlSecondary) = False

.Axes(xlCategory, xlPrimary).CategoryType = xlAutomatic
'Errors here
.Axes(xlCategory, xlSecondary).CategoryType = xlCategoryScale

' some more code here but doesn't involve error
End With