473,804 Members | 5,054 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 19244
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
7461
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
2001
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
5304
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
2447
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
1751
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
5278
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
1444
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
9706
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
9579
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
10577
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
10320
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
10077
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7620
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6853
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
5521
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...
1
4299
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.