Excel 我想让代码执行等待不到1秒怎么做

2024-11-15 01:06:40
推荐回答(1个)
回答1:

用sleep试试,不太精确:
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub Test()
Dim t
t = Timer
Sleep 500
MsgBox Timer - t
End Sub