Thread: Run time error
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
MB[_6_] MB[_6_] is offline
external usenet poster
 
Posts: 1
Default Run time error

I get the following error when I close the spreadsheet

Run Time error 1004

Method on time of object _application failed

Help!

here's the code in debug





Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.OnTime EarliestTime:=TimeValue("00:00:10"), _
Procedu="Total", Schedule:=False
End Sub

Private Sub Workbook_Open()
Application.OnTime Now + TimeValue("00:00:10"), "Total"
End Sub