Thread: ScaleType error
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier Jon Peltier is offline
external usenet poster
 
Posts: 6,582
Default ScaleType error

I've run across this in 2007 and reported it, but nobody seemed impressed
enough to want to fix it.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
_______


"jcdecker" wrote in message
...
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...