发布于 2006-12-20 19:45:57
0楼
连外部变量可以了:
Dim objTag
Set objTag=HMIRuntime.Tags("temprature")
objTag.read
objExcelApp.worksheets("sheet1").Cells(linecount, 2).VAlue =objTag.read 多谢指点
但触发建文件还是不行.定时器调函数 该怎么调
现在我是组态一个每天某时定时器建文件 一个十秒定时器调写动作
函数该怎么调是直接
Option Explicit
Function action
writeexcel( )
End Function
Option Explicit
Function action
Dim fso,myfile,daystr,dstr,fname
dstr = FormatDateTime(Date)
fname="d:\" + dstr + ".xls"
Set fso = CreateObject("s cripting.FileSystemObject")
Set MyFile = fso.GetFile("d:\ExcelExample.xls")
MyFile.Copy (fname)
End Function
为什么不行,
你们在论坛上的贴我看了些
都没有这方面的.
123