Search notes:

Examples for Visual Basic for Application accessing the Windows API: Sleep

The following example needs the VBA declarations of the Windows API which can be found here.
sub main()

    msgBox "I am going to sleep for three soconds"

  '
  ' The Sleep call expects the duration in milliseconds.
  ' 3000 milliseconds is 3 seconds
  '
    Sleep 3000

    msgBox "Woken up"

end sub
Github repository WinAPI-4-VBA, path: /examples/Sleep.bas

See also

The Excel function application.wait allows to schedule the execution of a VBA procedure.
Other examples

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758200820, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/VBA/Win-API/examples/Sleep(56): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78