VBA 通过timer计时

来源:互联网 发布:windows按键双系统切换 编辑:程序博客网 时间:2024/05/16 09:33

       本文主要介绍VBA中通过timer函数来计时。

'calc cost time by timerSub getCostTime()    c = Timer    Dim costTime As Single    Dim i As Long    Dim str As String    Do While i < 50000        str = str & i        i = i + 1    Loop        costTime = Timer - c    Debug.Print (costTime * 1000) & " ms"End Sub


 

0 0