0
當需要選擇刷新按鈕時,我需要能夠在單元格中放置時間和日期戳記。我在網上嘗試了一些東西,似乎沒有任何工作。這是我目前正在使用的,它只是粘貼一些關於嵌入的代碼commandbutton 1自動使用刷新按鈕被選擇時的日期填充單元格
Private Sub CommandButton1_Click()
' AutoRefresh all the Tables and Charts
ActiveWorkbook.RefreshAll
If CommandButton1.Select Then
Range("F8").Value = Format(Date, "dd-mmmm-yyyy") & " " & Format(Now, "h:mm:ss AM/PM")
End If
End Sub
謝謝你,第一次我做到了這一點,我收到了一個錯誤,然後我意識到我還需要拿出那個。 – cinstanl