쿨타임,시간지연

V닉맨 2014.05.25 21:37:03 *: Private Declare Function GetTickCount Lib "kernel32" () As Long



Sub Wait(ByVal cTime As Long)
Dim sTime As Long


sTime = GetTickCount + cTime


Do While sTime >= GetTickCount
Application.DoEvents()
Loop
End Sub
* cTime 단위는 ms(밀리초, 1000분의 1초)임

* 사용방법
 
Wait(밀리초)