【问题标题】:VBScript not working? Page setup wrongVBScript 不工作?页面设置错误
【发布时间】:2011-05-04 00:41:56
【问题描述】:

我有一个 Excel 报告程序。当它打印时,我希望日期在左边。

我用过这段代码

.LeftHeader = "Printed on &D &T"

但是,我需要在上面的“head”评论中添加评论。

head = "In these quotes should be the date" 

引号中应该包含什么来打印日期?

【问题讨论】:

    标签: excel vba datetime printing vbscript


    【解决方案1】:

    以下给出日期为格式化字符串。您可以修改它以满足您的要求

    head = Format(Date(), "yyyy/mm/dd")
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-22
      • 2022-07-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多