VBA - 定時器函式



Timer 函式返回自凌晨 12:00 以來經過的秒數和毫秒數。

語法

Timer() 

示例

新增一個按鈕並新增以下函式。

Private Sub Constant_demo_Click()
   msgbox("Time is : " & Now())
   msgbox("Timer is: " & Timer())
End Sub

執行上述函式後,將生成以下輸出。

Time is : 19/07/2013 3:45:53 PM
Timer is: 56753.4 
vba_date_time.htm
廣告
© . All rights reserved.