以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://weistock.com/bbs/index.asp)
--  高级功能研发区  (http://weistock.com/bbs/list.asp?boardid=5)
----  vba的调试输出DebugFile的使用问题  (http://weistock.com/bbs/dispbbs.asp?boardid=5&id=56666)

--  作者:lhyldz
--  发布时间:2013/9/16 8:21:08
--  vba的调试输出DebugFile的使用问题
vba的 Document对象的DebugFile方法如何输入参数?

帮助系统是这样写的:

DebugFile(Path, Text, Time)

Path   日志保存全路径,比如"C:\\OrderLog.Txt"

Text   日志记录数据内容

Time   是否自动添加时间

我问一下,Time这个参数如果写,我是直接写的 Time ,可输出不太对,有时候能输出时间,有时候就不能输出时间。

下面是我写的代码,前面的time不写是不输出时间的

 call Document.DebugFile("c:\\OrderLog.Txt",time & "成交", time)


<!--ZOOMSTOP-->

--  作者:rushtaotao
--  发布时间:2013/9/16 9:00:18
--  
  Document.DebugFile "C:\\OrderLog.Txt","成交",1