![](/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.