If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Excel Timer

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-01-04, 12:32
Alexxx12 Alexxx12 is offline
Registered User
 
Join Date: Sep 2002
Location: NJ
Posts: 139
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
Reply With Quote
  #2 (permalink)  
Old 10-26-04, 08:13
DavidCoutts DavidCoutts is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On