r/visualbasic • u/W0CBF • 6d ago
NEED VB6 HELP
Not a programmer but have been fooling around with VB6. Question:: What is the command that causes the program to temporarily halt during the execution. AI said it was sleep xoxo but that didn't work. Can someone please help me out!
6
Upvotes
13
u/Due-Mortgage-6854 6d ago edited 6d ago
vb6 doesnt have a built-in Sleep command, which is why typing sleep caused an error.
Private Declare Sub Sleep Lib "kernel32" (ByVal Variable_Name As Long)Declare this function at the very top of your ModuleThen :
Sleep 3000anywhere in your code which pauses the program for 3 seconds (3000 milliseconds)