Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login

POZE MRRRR'S FORUM (VIEW ONLY)

Nu sunteti logat.
Nou pe simpatie:
Nebunatyka din Bucuresti
Femeie
23 ani
Bucuresti
cauta Barbat
23 - 73 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [WORD] How to Wait / Sleep in Word VBA Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
Mrrrr
AdMiN

Inregistrat: acum 17 ani
Postari: 2186
In Word VBA the traditional Excel command Application.Wait (Now + TimeValue("00:00:01")) does not work.

The workaround is to use the WinAPI Sleep function, like this:


' put the following line before your subroutine (before Sub...)
Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)

' Sub...
' do something

' put the following line where you want VBA to wait / sleep

Sleep 1000 ' 1000 = 1 second


Source:


_______________________________________


pus acum 7 luni
   
Pagini: 1  

Mergi la