Sub 测试代码执行时间() Dim tim1, tim2 tim1 = Timer '---这中间请放置您要测试执行时间的代码--- tim2 = Timer MsgBox Format(tim2 - tim1, "程序执行时间为:0.00秒"), 64, "时间统计" End Sub