下面的程序在EXcel2000和Excel 2003中运行正常,在Excel xp(Excel 2002)下运行出现unknow name的提示,
位置在下面注释。
出错的程序如下:
#define XlXYScatterLines 74
#define xlCategory 1
#define xlValue 2
#define xlTickLabelOrientationUpward -4171
#define xlUpward -4171
#define xlTickLabelOrientationHorizontal -4128
sele m_mjger
thisform.refresh
with this.Ole1
.HasTitle=.f.
.HasLegend=.f.
.ChartType=XlXYScatterLines &&&从此处开始出现unknow name的提示
.PlotArea.Interior.Color = RGB(255, 255, 255)
.ChartArea.Interior.Color = RGB(255, 255, 255)
.ChartArea.Border.LineStyle = 1
.PlotArea.Border.LineStyle = 5
endwith
with this.Ole1.Axes(xlValue)
.MajorUnit =10
.MinorUnit =5
.HasTitle=.t.
.AxisTitle.Caption="Y轴"
.AxisTitle.Font.Size=9
.AxisTitle.Orientation=xlUpward
.TickLabels.Font.Size=9
.HasMajorGridlines = .f.
.MinimumScale =m_mjger.纵最小刻度
.MaximumScale =m_mjger.纵最大刻度
endwith
with this.Ole1.Axes(xlCategory)
.MajorUnit =10
.MinorUnit =5
.HasTitle=.t.
.AxisTitle.Caption="X轴"
.AxisTitle.Font.Size=9
.TickLabels.Orientation=xlTickLabelOrientationHorizontal
.TickLabels.Font.Size=9
.MinimumScale =m_mjger.横最小刻度
.MaximumScale =m_mjger.横最大刻度
endwith