On 2002-10-26 19:16, Yogi wrote:
I was advise not to use a button but initiate the macro by clicking on the cell so I entered the following:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$BA$2" Then
Sub CountDown()
Dim pausetime As Single
Dim start As Single
Dim finish As Single
Dim totaltime As Single
pausetime = 25 ' Set duration.
start = Timer ' Set start time.
Sheets(1).Range("BA2").Value = 25
Do While Timer< start + pausetime
DoEvents ' Yield to other processes.
Sheets(1).Range("BA2").Value = _
Format(pausetime + (start - Timer), "##")
Loop
Sheets(1).Range("BA2").Value = 25
End If
End Sub
Still with no success. Could someone please advise?
This message was edited by Yogi on 2002-10-26 19:23