基本画出曲线,但是改变纵坐标的两个语句提示找不到变量“xlvalue”,这个变量是指什么?
oExcel = CREATEOBJECT('Excel.Application')
name_file="f:\201903041018_3.xls"
oExcel.Workbooks.Open("&name_file")
oExcel.Visible = .F.
oExcel. Columns("Q:Q").Select
oExcel.ActiveSheet.Shapes.AddChart.Select
oExcel.ActiveChart.ChartType = 4
oExcel.ActiveChart.Axes(xlValue).MinimumScale = 1100
*坐标下限
oExcel.ActiveChart.Axes(xlValue).MaximumScale = 1500
*坐标上限
oExcel.quit
下面是EXECEL录制的宏:
Sub 宏2()
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlLine
ActiveChart.SetSourceData Source:=Range("'201903041018_3'!$Q:$Q")
ActiveChart.Axes(xlValue).Select
ActiveChart.Axes(xlValue).MinimumScale = 1100
ActiveChart.Axes(xlValue).MaximumScale = 1500
End Sub
[此贴子已经被作者于2019-4-8 15:08编辑过]