Dim fso,myfile
Set fso = CreateObject("s cripting.FileSystemObject")
Set MyFile = fso.GetFile("d:\liaopi.xls")
Dim ObjExcelApp
Set objExcelApp = CreateObject("Excel.Application")
'objExcelApp.Visible = True
objExcelApp.Workbooks.Open MyFile
objExcelApp.worksheets ("sheet1").Cells(2,1).VAlue = HMIRuntime.Tags("riqi").read
objExcelApp.worksheets ("sheet1").Cells(2,2).VAlue = HMIRuntime.Tags("shijian").read
objExcelApp.worksheets ("sheet1").Cells(2,3).VAlue = HMIRuntime.Tags("上仓重量_1").read
objExcelApp.ActiveWorkbook.Save
coldold.Write
End Sub
现在的问题是如何让它每运行一次这个脚本 就一行一行的自动生成下去,而不是始终在这一行里?
谢谢