Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VBA- Application.Wait?

1,825 views
Skip to first unread message

Mel

unread,
Mar 10, 2010, 2:29:14 AM3/10/10
to
Does PowerPoint not have "Application.Wait" like Excel? Is there
another way to pause code for a few seconds in PPT 2003/2007 while a
small bat file runs?

-Mel

David Marcovitz

unread,
Mar 10, 2010, 10:45:32 AM3/10/10
to

From Example 8.4 on my Web site (http://www.PowerfulPowerPoint.com/):

Sub Wait()
waitTime = 5
Start = Timer
While Timer < Start + waitTime
DoEvents
Wend
End Sub

This will wait for 5 seconds.

--David

--
David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
Microsoft PowerPoint MVP
Associate Professor, Loyola University Maryland

Steve Rindsberg

unread,
Mar 10, 2010, 11:11:31 AM3/10/10
to
In article <312255c7-711b-46a2-977e-

Put your macro to Sleep
http://www.pptfaq.com/FAQ00466.htm

There are more sophisticated ways of doing it, like launching the bat
file and monitoring its window, not proceeding until it closes. But if
you know that your bat file will complete in a short time and don't
mind waiting a few milliseconds extra here and there ... Sleep's the
simplest, most reliable way to get the job done.

==============================
PPT Frequently Asked Questions
http://www.pptfaq.com/

PPTools add-ins for PowerPoint
http://www.pptools.com/


0 new messages