Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default Wait Seconds and Tenths

JLG, I think I figured it out. Help says that in Windows, Timer
returns fractional seconds, and on the Mac the Timer resolution is 1
second. Since I'm on a PC, I decided to combine the seconds and the
fractional part into one mixed number. This SEEMS to work! Cheers,
James

Sub myTest()
TestTimer 0.5
End Sub

Sub TestTimer(myWait As Single)
Dim start
start = Timer ' Set start time.
Do While Timer < start + myWait
DoEvents ' Yield to other processes.
Loop
End Sub

JLGWhiz wrote:
I asked this question a few weeks ago and could not find anyone who knew how
to get less than one second. Hope you have better luck, but I don't think
you will find the answer in VBA.

"Zone" wrote:

I want to put a whole number in a cell, say A1, to represent seconds,
and another whole number in a cell, say B1, to represent tenths (or
hundredths) of a second. How do I get my macro to pause for this
amount of time? Please specify type of any variables! Thanks, James



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
sendkeys(keys,wait) how do I use wait MM Excel Discussion (Misc queries) 1 February 11th 09 03:47 PM
Macro wait 30 seconds then Complete the Macro Vick Excel Discussion (Misc queries) 2 June 2nd 08 08:04 PM
Display MsgBox wait for 10 seconds then click on yes automatically Vikram Dhemare Excel Programming 7 October 29th 06 11:57 AM
Average time for a race in minutes seconds & tenths Gammalite Excel Worksheet Functions 1 March 28th 06 03:50 AM
Converting Julian Seconds with a macro to replace old seconds data Keldair Excel Discussion (Misc queries) 2 February 18th 06 12:09 AM


All times are GMT +1. The time now is 10:27 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"