Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default OnTime problem

Please any help,

Im using XP and Excel 2000
When I run StopTimer() and I close the workbook, the workbook opens itself.
When I delete the On Error Resume Next line I get a error message "Methode
OnTime van object_Application is mislukt"
Can anyone tell me what I'm doing wrong??

Sub StopTimer()
On Error Resume Next
Application.OnTime earliesttime:=RunWhen, _
procedu=cRunWhat, schedule:=False
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default OnTime problem

Sub Macro7()
runwhen = Now
cRunWhat = "macro2"
Application.OnTime Earliesttime:=runwhen, _
Procedu=cRunWhat, schedule:=True
Application.OnTime Earliesttime:=runwhen, _
Procedu=cRunWhat, schedule:=False
End Sub

runs fine. This would indicate that your runwhen value does not represent a
time when a macro is scheduled to run. This must match exactly.

--
Regards,
Tom Ogilvy

Peter Pantus wrote in message
...
Please any help,

Im using XP and Excel 2000
When I run StopTimer() and I close the workbook, the workbook opens

itself.
When I delete the On Error Resume Next line I get a error message "Methode
OnTime van object_Application is mislukt"
Can anyone tell me what I'm doing wrong??

Sub StopTimer()
On Error Resume Next
Application.OnTime earliesttime:=RunWhen, _
procedu=cRunWhat, schedule:=False
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
Find %ontime & SUMIF ontime ie: find matching sets within Range... Chris T-M Excel Worksheet Functions 3 October 10th 08 08:14 PM
.ontime Grrrrrumpy Excel Discussion (Misc queries) 2 April 8th 07 04:18 PM
OnTime bug? Antonio Excel Discussion (Misc queries) 0 June 9th 06 08:24 PM
OnTime VB [email protected] Excel Discussion (Misc queries) 5 May 17th 06 10:53 PM
OnTime VB [email protected] Excel Worksheet Functions 2 May 16th 06 08:43 PM


All times are GMT +1. The time now is 01:54 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"