If you use that code I believe you will also need the Sleep API which is

Code:
Public Declare Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long)