Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with WAIT
Hi,
I’m having a problem displaying seconds as they count down from a value. Help indicates the following code for the WAIT method: This example displays a message indicating whether 10 seconds have passed. If Application.Wait(Now + TimeValue("0:00:10")) Then MsgBox "Time expired" End If When I put the example in my code as a stand-alone, it works as advertised. So, based on above, I’ve written the following code: For i = 10 To 1 Step -1 If Application.Wait(Now + TimeValue("0:00:01")) Then Range(A1).Offset(2, 0).Value = i Next i The problem is that I get an error saying ‘For’ without a ‘Next’. If I comment out the “If Application...” line, the Next is found and it runs! (Of course I get a “1” in the cell, but that is expected.) What I really want to do is, based on a count value in a cell (1-99) display a count-down in another cell. The count should increment in seconds. I don’t care if the application is stopped for 1-second intervals or not. The key here is showing the counting down. I’m using Excel 2000 if it makes a difference. Any ideas? Thanks in advance. Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Wait statement in macro | Excel Discussion (Misc queries) | |||
(keys,wait) excel | Excel Discussion (Misc queries) | |||
sendkeys(keys,wait) how do I use wait | Excel Discussion (Misc queries) | |||
Should I Wait? | Excel Discussion (Misc queries) | |||
Processing...Please Wait Message Box | Excel Discussion (Misc queries) |