寫法一
Public Sub Delay(DelayTime As Single) Dim BeginTime As Single BeginTime = Timer While Timer < BeginTime + DelayTime DoEvents Wend End Sub
寫法二
Sub delay(x) T = Timer '作暫停 Do Until Timer - T > x If T > Timer Then T = T - 86400 DoEvents Loop 'MsgBox "延遲了" & x & "秒" End Sub
沒有留言:
張貼留言