Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-25-2024, 08:36 AM
gmaxey gmaxey is offline Is there an 'Application.Wait' function in Word VBA? Windows 10 Is there an 'Application.Wait' function in Word VBA? Office 2019
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Add the following at the module level:


Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)


Run the following as a demo:
Code:
Sub Demo()
Dim lngIndex As Long
  For lngIndex = 1 To 10
    Doze 500
  Next lngIndex
  MsgBox "Done"
End Sub

Sub Doze(ByVal lngPeriod As Long)
  DoEvents
  Sleep lngPeriod
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to show wait cursor during vba script? BrianHoard Word VBA 4 08-27-2022 08:08 AM
Share Function is NOT linking to the application mlawton OneNote 0 05-22-2018 02:17 PM
Wait (hourglass) cursor constantly flashing after loading large file didlinghill Word 4 01-26-2015 06:08 AM
Is there an 'Application.Wait' function in Word VBA? Wait for 2013? Warranty issue.... alexb123 Office 1 12-14-2012 01:44 PM
Is there an 'Application.Wait' function in Word VBA? Applicatin.wait SDondeti Word VBA 1 05-27-2011 02:12 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:53 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft