VBA Timer()函数

Timer()函数返回自凌晨00:00起的秒数和毫秒数。

语法

Timer()

示例

添加一个模块,并添加以下示例代码 -

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

执行上面示例代码,得到以下结果 -

第二行代码,输出 -


上一篇: VBA日期时间函数 下一篇: VBA数组