View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Peter Beach Peter Beach is offline
external usenet poster
 
Posts: 70
Default minimum scale error code

Hi Aja,

I expect the problem is that XL is expecting a numeric value. Try

ActiveChart.Axes(xlCategory) = DateSerial(2000,1,1)

HTH

Peter Beach

"Aja" wrote in message
...
Hello,

How can I get my vba code below to set the minimum scale property of the

axis class.

The code on the line with the asterisk generates an error regarding min

scale when I try to run it. The error is: 'Unable to set the minimum
scale property of the axis class'

Sub macrotitlesize()
For i = 0 To 12
ActiveSheet.ChartObjects(i + 1).Activate
ActiveChart.Axes(xlCategory).MajorUnitScale = xlYears
ActiveChart.Axes(xlCategory).MinorUnitScale = xlMonths
ActiveChart.Axes(xlCategory).Crosses = xlCustom
ActiveChart.Axes(xlCategory).AxisBetweenCategories = True
ActiveChart.Axes(xlCategory).ReversePlotOrder = False
* ActiveChart.Axes(xlCategory).MinimumScale = "1/1/2000"
ActiveChart.Axes(xlCategory).MaximumScaleIsAuto = True
ActiveChart.Axes(xlCategory).MajorUnit = 1
ActiveChart.Axes(xlCategory).MinorUnitIsAuto = True
ActiveChart.Axes(xlCategory).MinorUnit = 1
ActiveChart.Axes(xlCategory).CrossesAt = "1/1/2000"

Next i
End Sub

Nor am I able to set the class for any of the statements below the

asterisk.