[VBA]计算宏运行所用时间

Sub 计算宏运行所用时间()
    
    Dim tt As Single
    tt = Timer
    '宏名字
    MsgBox "ok,用时" & Timer - tt & "秒!"
    
End Sub

你可能感兴趣的:(程序运行时间)