Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 171
Default What can we use as an equivalent to "Sleep()" in vb?

I searched through the archives and there were a few messages
discussing this but no actual syntax could be found (at least during 2
searches).

Is there any vb equivalent to "Sleep()"?

Thanks. :oD

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default What can we use as an equivalent to "Sleep()" in vb?

Use the Sleep API:

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

Sub TestingSleep()

Sleep 2000
Cells(1) = 1

End Sub


RBS

"StargateFan" wrote in message
...
I searched through the archives and there were a few messages
discussing this but no actual syntax could be found (at least during 2
searches).

Is there any vb equivalent to "Sleep()"?

Thanks. :oD


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default What can we use as an equivalent to "Sleep()" in vb?

Do you mean this?

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

Sub test()
Msgbox "Wait for 1 sec"
Sleep 1000
Msgbox "Done"
End Sub

StargateFan wrote:
I searched through the archives and there were a few messages
discussing this but no actual syntax could be found (at least during 2
searches).

Is there any vb equivalent to "Sleep()"?

Thanks. :oD

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default What can we use as an equivalent to "Sleep()" in vb?

Two ways


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

Sub WaitSeconds()
Sleep 1000 * 3 ' 3 seconds
End Sub


and


Sub WaitFor()
Application.Wait Now + TimeSerial(0, 0, 3) ' 3 seconds
End Sub

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"StargateFan" wrote in message
...
I searched through the archives and there were a few messages
discussing this but no actual syntax could be found (at least during 2
searches).

Is there any vb equivalent to "Sleep()"?

Thanks. :oD



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default What can we use as an equivalent to "Sleep()" in vb?


"Bob Phillips" wrote in message
...
Two ways


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

Sub WaitSeconds()
Sleep 1000 * 3 ' 3 seconds
End Sub


and


Sub WaitFor()
Application.Wait Now + TimeSerial(0, 0, 3) ' 3 seconds
End Sub


Thanks to everyone for their responses! :oD

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"StargateFan" wrote in message
...
I searched through the archives and there were a few messages
discussing this but no actual syntax could be found (at least during 2
searches).

Is there any vb equivalent to "Sleep()"?

Thanks. :oD





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
COUNTIFS equivalent in Excel 2003 - both criteria have text, one has "wildcard" Courtney[_3_] Excel Worksheet Functions 3 April 20th 10 03:01 AM
VBA equivalent for WScript.Sleep urkec Excel Programming 3 April 8th 07 09:22 AM
Is there an Excel 2003 equivalent to Word's "versions" function? Steve Excel Discussion (Misc queries) 0 March 4th 07 02:01 AM
Is there an equivalent of Lotus 123's "Paste visible" command? AJ Excel Discussion (Misc queries) 6 March 16th 06 09:21 AM
What would be Excel's equivalent for a Lotus line "[Input].MoveCellPointer $Right,1"? Spamfighter Excel Programming 2 September 16th 05 08:11 PM


All times are GMT +1. The time now is 10:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"