Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Pausing a VBA macro

Is there any VB function (other than 'Wait') that allows
you to pause execution of a VB macro for a specified time?

The minimum pause allowable with the 'Wait' utility appears
to be 1 sec, but I only want to pause for a small fraction
of a second.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Pausing a VBA macro

It should work. Copy the following line at the very beginning of your
module:
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Then call in your subroutine:
Sleep(5000) ' for a delay of 5 seconds.

"Dean Taylor" wrote in message
...
Is there any VB function (other than 'Wait') that allows
you to pause execution of a VB macro for a specified time?

The minimum pause allowable with the 'Wait' utility appears
to be 1 sec, but I only want to pause for a small fraction
of a second.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA macro pausing [email protected] Excel Worksheet Functions 2 February 23rd 09 01:19 PM
Pausing a macro Alex.W Excel Discussion (Misc queries) 2 August 10th 07 11:30 AM
Pausing Macro Patches New Users to Excel 2 March 28th 07 03:00 AM
Is there a way of pausing a macro Shazza Excel Discussion (Misc queries) 2 March 12th 07 10:59 PM
Pausing a Macro PaulW Excel Discussion (Misc queries) 0 May 30th 06 02:05 PM


All times are GMT +1. The time now is 07:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"