Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel VBA - Timer

I have a VBA function in an Excel spreadsheet that is called on a
timer as follows:



Function f()

scheduleNextCallToF

' CATCH ANY ERRORS
On Error GoTo SomethingHappened:

' DO SOME WORK

SomethingHappened:
MsgBox "We've had a problem publishing the curves :
write this down - " & Err.Number & " " & Err.Description & "
" & Err.Source


End Function

Function scheduleNextCallToF()

Private runWhen As Double

runWhen = Now + TimeSerial ( 0 , 0 , 30) 'RUNS EVERY 30 SECS

Application.OnTime earliesttime:=runWhen , prodedu= "f" , schedule
:=False

End Function


This function runs fine for the majority of the day, however each
morning for _some_ users, the function stops working.
However no error appears to take place as the MsgBox never appears.

[Note: The DO SOME WORK section takes less than a second to be
performed]

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
Timer in Excel Gil Excel Discussion (Misc queries) 2 January 14th 10 12:57 PM
Pop up timer for excel jlclyde Excel Discussion (Misc queries) 1 August 31st 07 10:08 PM
EXCEL TIMER CONTROL Avinash Shukla Links and Linking in Excel 0 June 28th 07 11:38 AM
Stopping a Timer / Running a timer simultaneously on Excel Paul23 Excel Discussion (Misc queries) 1 March 10th 06 12:08 PM
Excel VBA - Timer Xing Zhou Excel Programming 4 July 23rd 04 04:03 PM


All times are GMT +1. The time now is 02:20 PM.

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

About Us

"It's about Microsoft Excel"