Here’s another known trick for VB/VBA, if you code a lot in C/Java and then switch to VB/VBA you might be surprized to know that there is no sleep function in VB. However there is a hack to implement it.
Just refer the library kernal32 for Sleep function and then use it!! Simple isn’t it?
This is what you need to put in –
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
The function can be called as usual –
Sleep (2000)
You must be logged in to post a comment.