高手帮我看看这个展点程序错在哪里?
我这个程序是从Excel表中读数据,展成管线图,但是数据超过3000点时,总是死机。看进程管理时,发现每次用New Excel.Application时,好象总是有两个Excel对象生成。这样,在Excel.Quit后,系统里总是好象还有一个Excel对象,'定义Excel的相关变量<BR> Dim Excel As Excel.Application ' EXCEL对象变量<BR> Dim PointSheet As Object '点表<BR> Dim LineSheet As Object '线表<BR> Dim ExcelWorkbook As Object '工作簿<BR> '初始化 Excel对象<BR> Set Excel = New Excel.Application<BR> Set ExcelWorkbook = Excel.Workbooks.Open(FileName, ReadOnly)<BR> Set PointSheet = Excel.Worksheets(1) '点表<BR> Set LineSheet = Excel.Worksheets(2)<BR> PointSheet.Activate
'展点过程
'退出过程<BR> Excel.Quit<BR> Sleep 5000<BR> DoEvents<BR> Set PointSheet = Nothing<BR> Set LineSheet = Nothing<BR> Set ExcelWorkbook = Nothing<BR> Set Excel = Nothing<BR>具体程序我已经上传,恳请高手指点,我已经困惑了一个星期了
页:
[1]