473,795 Members | 3,167 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application.Wai t

18 New Member
VBA for Excel contains the command Application.Wai t ("time").

It does not however work in a Word application. Is there a similar command for VBA in Word?

Thanks.

Bertie
May 2 '07 #1
4 19242
ansumansahu
149 New Member
VBA for Excel contains the command Application.Wai t ("time").

It does not however work in a Word application. Is there a similar command for VBA in Word?

Thanks.

Bertie

Put this
into your Declarations section in either your module
or form/report source code:

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

Here's a sample call:

Sleep (5000) ' Waits for 5 seconds


-ansuman sahu
May 2 '07 #2
EByker
18 New Member
Put this
into your Declarations section in either your module
or form/report source code:

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

Here's a sample call:

Sleep (5000) ' Waits for 5 seconds


-ansuman sahu

Thanks!

Does this procedure "sleep" the application only, or the system?

B
May 3 '07 #3
Denburt
1,356 Recognized Expert Top Contributor
Only the program it is used in:

The Kernel32 contains a function that pauses a program's execution for a specified amount of time, specified in milliseconds. For you to use the function, it must first be declared in the General Declarations section of the module in which it will be used:
More info and other methods you can use

:) I hope that answers your questions.
May 3 '07 #4
EByker
18 New Member
Only the program it is used in:



More info and other methods you can use

:) I hope that answers your questions.
Yes, it certainly does. Thanks a lot!

B
May 4 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

17
7457
by: David Hughes | last post by:
For example, in Python in a Nutshell, Alex Martelli shows how you can run a Windows (notepad.exe) or Unix-like (/bin/vim) text editor using os.spawnv(os.P_WAIT, editor, ) But how would you call the OS X text editor /Applications/TextEdit.app - which appears to be a whole directory inside /Applications? I'm sorry if the answer is blindingly obvious. I work alone and sometimes just get stuck, then have to ask in public and risk appearing...
0
1999
by: s_erez | last post by:
Hi, This is a realy tricky one. I have an ASP.NET application where some pages are reading data from a DB and presenting reports. In order for the user to wait while the page is reading data from the DB I am using a DIV with a please wait message which is removed once the page is loaded. In addition I am using a global error handling using the Application_Error void in the Global.asax file. when the application is loading a page which...
5
50939
by: BOOGIEMAN | last post by:
I want to put my console application to wait some time (for example 10 seconds) How do you do that ? Also, how does "Press any key to continue" code look like in C# ? If it helps, I can post here code example in Python Thanks in advance
6
5300
by: Max | last post by:
I have the following code on a form that launches Microsoft Outlook and creates a new email message for the user: Outlook.Application oApp = new Outlook.Application(); Outlook.MailItem oMail = (Outlook.MailItem)oApp.CreateItem(Outlook.OlItemType.olMailItem); oMail.HTMLBody = "SOME HTML TEXT HERE"; oMail.Display(oApp); oMail.Close(Outlook.OlInspectorClose.olDiscard);
1
1663
by: kuldeepiitk | last post by:
Is there any way that i can make my application wait for some time so that page loads in that time, right now I am using following code, ================================= Public Sub waitBySecs(ByVal nNumSecs As Integer) Dim d1, d2 As DateTime d1 = DateTime.Now.AddSeconds(nNumSecs) d2 = DateTime.Now
6
2445
by: SP | last post by:
Hi, I want to add wait cursor code whenever page is post back. Page may be post back on my user control's or on change of dropdown or on click of any button on page. so is there any common solution available that will provide me mechanism to display wait cursor or wait image to user whenever page is post back to server? Thanks,
3
1747
by: Glyn Simpson, MVP | last post by:
Hi I've got an ASP.NET 2.0 application, and I would like to catch the scenario of when I get a certain number of application errors, I want to restart the application (similar to 'touching' web.config). However, I don't have access to IIS, nor can I FTP in a new web.config file to force the application to restart.I can't see any way at the moment to do this through code, which would be good, as I can then restart it remotely (through...
12
5277
by: Perecli Manole | last post by:
I am having some strange thread synchronization problems that require me to better understand the intricacies of Monitor.Wait/Pulse. I have 3 threads. Thread 1 does a Monitor.Wait in a SyncLock block protecting a resource. Thread 2 and 3 also have a SyncLock block protecting the same resource and after executing some code in their blocks they both do a Monitor.Pulse to hand of the locked resource back to thread 1. While thread 1 has...
12
1443
by: FLX | last post by:
Hello all, I have problems letting this application wait. I tried everything in my knowledge. Here is the code: System.Diagnostics.Process procdemux = new System.Diagnostics.Process(); procdemux.StartInfo.UseShellExecute = true; procdemux.StartInfo.CreateNoWindow = false; procdemux.StartInfo.RedirectStandardOutput = false;
0
9672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9519
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10435
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10163
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9037
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6779
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.