Thread: ScaleType error
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jcdecker jcdecker is offline
external usenet poster
 
Posts: 3
Default ScaleType error

I have some VBA code that works fine in Excel 2003, but throws an error in
Excel 2007. Here is the part of the code that fails:

With ActiveChart.Axes(xlCategory, xlSecondary)
.MinimumScale = X2Min
.MaximumScale = X2Max
.MinorUnitIsAuto = True
.MajorUnit = BinSize
.Crosses = xlMaximum
.ReversePlotOrder = False
.ScaleType = xlLinear
.DisplayUnit = xlNone
End With

All of these lines work except for .ScaleType = xlLinear. When that line is
reached, the error: "Method €˜ScaleType of object €˜Axis failed" pops up. I
tried changing it to .ScaleType = xlScaleLinear, but that errors out also.

Does anybody have any ideas? This is pretty frustrating...