【问题标题】:Problems with obtaining modified date获取修改日期的问题
【发布时间】:2014-04-02 21:41:04
【问题描述】:

我有一个名为“Visor Portafolio.xls”的打开工作簿,我想将其最后修改日期写在我当前工作簿(运行宏的那个)上的单元格 H6 中。我想把它放在我使用的宏的末尾。

我尝试了很多不同的解决方案,但似乎都不起作用。谁能帮我解决这个问题?

【问题讨论】:

    标签: excel vba date


    【解决方案1】:

    如果你在一个宏中:

    Sub Macro1()
        Range("H6").Select
        ActiveCell.FormulaR1C1 = LastSaveDate()    
    End Sub
    
    
    Function LastSaveDate()
         Application.Volatile True
         LastSaveDate = FileDateTime(ThisWorkbook.FullName)
     End Function
    

    基于:http://answers.microsoft.com/en-us/office/forum/office_2010-excel/insert-the-date-an-excel-workbook-was-last/c0c7335e-fc0d-43c7-b32d-215f84b452cc

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-12
      • 1970-01-01
      • 2020-09-30
      • 1970-01-01
      相关资源
      最近更新 更多