标题: 在QTP中打开excell, 出现 Not enough system resources to display completely。 [打印本页] 作者: zoeHuang 时间: 2007-6-7 14:48 标题: 在QTP中打开excell, 出现 Not enough system resources to display completely。 打开EXCELL代码:
set srcData = CreateObject("Excel.Application")
srcData.Visible = true
set ExcelData = CreateObject("Excel.Application")
ExcelData.Visible = true
on error resume next
DataTable.Export("C:\temp\Default.xls")
set srcDoc = srcData.Workbooks.Open("C:\temp\Default.xls")
srcDoc.Worksheets("Result").Activate
set ExcelDoc = ExcelData.Workbooks.Open("C:\temp\TCOE_Performance_Test_Report.xls")
ExcelDoc.Worksheets("Compass").Activate
remote 到一台服务器上,跑这段代码,当把remote桌面开着的时候没有问题,可是如果跑这段代码的时候,remote桌面是最小化的,跑到set srcDoc = srcData.Workbooks.Open("C:\temp\Default.xls")后,出现Not enough system resources to display completely 提示。所以每次最下化remote桌面去跑得时候总是不能成功。