Results 1 to 2 of 2

Thread: Excel Timer

  1. #1
    Join Date
    Sep 2002
    Location
    NJ
    Posts
    139

    Unanswered: Excel Timer

    Hi
    Win2k, Xp
    Excel2k

    When I Run A Macro For The Timer, It Appears In All The Sheet Within The Workbook Or Any Other Opened Workbook. Is There A Way To Only Have It Appear In One Sheet And The Others???

    Code:
    Sub StartTimer()
    On Error Resume Next
    RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds)
    Application.OnTime earliesttime:=RunWhen, procedure:=cRunWhat, schedule:=True
    End Sub
    
    Sub StopTimer()
       On Error Resume Next
       Application.OnTime earliesttime:=RunWhen, procedure:=cRunWhat, schedule:=False
       Range("j2").Interior.ColorIndex = 8
       Range("j2").Borders.LineStyle = True
       Application.OnTime earliesttime:=Now, procedure:=NAME, schedule:=False
         
    End Sub

  2. #2
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    Hi Alexxx,

    Just fully reference where you want the timer to write
    i.e. instead of range("J2") use
    Workbooks(bookName).Worksheets(SheetName).Range("J 2")

    HTH
    Dave

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •