I googled and tried with some below codes, but nothing is working fine for me. 
Private Sub Workbook_BeforeClose(Cancel As Boolean)
' Written in ThisWorkbook
Application.DisplayAlerts = False
Application.EnableEvents = False
Call StopTimer3 ' and I also tried to call the StopTimer1 & StopTimer2 but, tht was failed too.
ActiveWorkbook.Save
Application.EnableEvents = True
End Sub
' In a module:
Public RunWhen As Double
' ==============================================
Public SplashRunWhen As Double
Public Const cSplashRunIntervalSeconds = 60 'ONE minute = 60 Seconds
Public Const cSplashRunWhat = "SplashScreen_Open"
' In a module:
Sub StopTimer1()
On Error Resume Next
Application.OnTime EarliestTime:=RunWhen, Procedure:="CloseBook", Schedule:=False
End Sub
' ==============================================
Sub StopTimer2()
On Error Resume Next
Application.OnTime EarliestTime:=RunWhen, Procedure:=cRunWhat, Schedule:=False
Application.OnTime EarliestTime:=SplashRunWhen, Procedure:=cSplashRunWhat, Schedule:=False
End Sub
' ==============================================
Sub StopTimer3()
' http://www.cpearson.com/excel/OnTime.aspx
On Error Resume Next
Application.OnTime EarliestTime:=RunWhen, Procedure:=cRunWhat, _
Schedule:=False
End Sub
I found StopTimer2 code from : http://www.excelforum.com/excel-prog...r-closing.html
Please see the above attached workbook and help me out....
Bookmarks