延时函数(单位秒),例如延时0.5秒
1 Sub 延时() 2 delay (0.5) 3 Debug.Print "延时0.5秒" 4 End Sub 5 6 Sub delay(T As Single) 7 Dim T1 As Single 8 T1 = Timer 9 Do 10 DoEvents 11 Loop While Timer - T1 < T 12 End Sub