Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Stopping a timer

Good news

That did not work,

But I did solve it. While the Call StopTimer worked great if you manually
closed the workbook (but not when the WorkBookClose timer closed the
workbook) I found that I had to add Call StopTimer to Module1. I am sorry I
had not included all of Module1. I was trying to reduce the size of the post
and thought they missing code was not relevant.

So thank you for your help and I hope my omission did not cause you to much
extra work.



Module1

Public bSELCTIONCHANGE As Boolean
Public Cancel As Boolean

'Code for Closing Workbook
Public Const NUM_MINUTES = 2 'Time interval for closing the workbook(in
minutes)
Public RunWhenClose As Double

' Code for the Data Update Timer
Public Const cRunIntervalSeconds = 30 'Time interval for pulling updated
data from Calendar (in seconds)
Public Const cRunWhat = "TheSub" ' the name of the procedure to run
Public RunWhen 'As Date

'Code for Splash Screen Timer
Public Const SPLASH_MINUTES = 1 'Time interval for the Close Splash screen
(in minutes)
Public RunWhenSplash As Double

Public Sub ShowMySplash()
ClosingSplashScreen.Show
End Sub

Public Sub SaveAndClose()

If ThisWorkbook.ReadOnly = False Then
Call StopTimer
ThisWorkbook.Close True 'True causes the file to save when closed
End If

If ThisWorkbook.ReadOnly = True Then
Call StopTimer
ThisWorkbook.Close False 'False causes the file not to save when closed
End If

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
Stopping a CountIf Don Kline[_2_] Excel Worksheet Functions 5 May 22nd 09 04:39 PM
stopping code Jase Excel Discussion (Misc queries) 1 October 6th 08 05:42 PM
Stopping A Macro Mike Lewis Excel Programming 4 July 11th 08 01:29 PM
Stopping a formula Roachy Excel Discussion (Misc queries) 3 July 1st 08 03:31 PM
Stopping a Timer / Running a timer simultaneously on Excel Paul23 Excel Discussion (Misc queries) 1 March 10th 06 12:08 PM


All times are GMT +1. The time now is 10:16 AM.

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

About Us

"It's about Microsoft Excel"