Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Countdown Timer Followup

When I changed from "Sheet1" when clock was running, clock appeared in the
"Sheet2" as well in that specific cell and gave me hourglass cursor so I
couldn't go back to the orignial sheet. Is there anyway to overcome this? I
plan to switch between other sheets while the clock is running to input data
that will stop the clock.

This is the code written in the sheet:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
mPrev = Me.Range(WS_RANGE).Value
End Sub

Private Sub Worksheet_Calculate()

On Error GoTo ws_exit
Application.EnableEvents = False

If Me.Range(WS_RANGE).Value < mPrev Then
With Me.Range(WS_RANGE)
If .Value = 1 Then
nCount1 = 60
Call RunTimer
ElseIf .Value = 0 Then
nCount1 = 0
End If
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub


This is code written in the module:

Public nCount1 As Long
Public Sub RunTimer()
If nCount1 = 0 Then
Range("W11") = nCount1
nCount1 = nCount1 - 1
Application.OnTime Now + TimeSerial(0, 0, 1), "RunTimer"
End If
End Sub
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
How to set up countdown timer to countdown days to a specific day Jenny Excel Worksheet Functions 3 May 8th 23 07:43 PM
Countdown timer Ira Excel Discussion (Misc queries) 7 November 16th 07 01:50 AM
Countdown timer Jock Excel Programming 15 May 21st 07 02:16 PM
Countdown Timer Saxman Excel Discussion (Misc queries) 1 February 6th 07 09:55 AM
HELP for COUNTDOWN TIMER CC Excel Discussion (Misc queries) 3 May 8th 06 12:44 PM


All times are GMT +1. The time now is 11:13 AM.

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

About Us

"It's about Microsoft Excel"