![](/img/trans.png)
[英]VBA - Office 365/SharePoint - How to get last modified date of file on Sharepoint?
[英]VBA Date in Office 365
我在 VBA Office 2016 32 位中创建了项目,现在我正在尝试在 Office 365 32 位(WIN10)中运行它,当然我在使用 DataPicker 时遇到了问题(已解决),但现在在运行代码时出现错误“编译错误:不能查找项目或库”。 问题是这样的:
currentMonth = Month(Date)
你知道为什么“日期”不能显示今天的日期吗? 在 Excel 2016 中没有问题。
此处未定义日期。 是在别处定义的吗? 似乎日期已被重新定义。
此代码也适用于早期版本:
Option Explicit
Sub test()
Dim theDate as Date
Dim currentMonth As Integer
theDate = Now()
currentMonth = Month(theDate)
Debug.Print currentMonth
End Sub
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.