LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Kill App macro is restarting app

I use this to Save and close the workbook when the user is idle for 10 minutes:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim TimeOut As Date
TimeOut = Now() + TimeValue("00:10:00")
Application.OnTime TimeOut, "KillApp"
End Sub


Sub KillApp()
ThisWorkbook.Save
ThisWorkbook.Close
End Sub

But as soon as the workbook finishes saving and closing, it opens right back
up again??? Can anyone help?
 
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
Kill a Macro? Andyjim Excel Programming 3 February 14th 08 10:23 PM
Excel Restarting Teacher Excel Worksheet Functions 0 December 1st 07 07:16 AM
Kill Macro Jeff Excel Discussion (Misc queries) 4 September 27th 06 04:33 PM
Restarting a macro BR Excel Worksheet Functions 19 December 23rd 05 09:57 PM
How to Kill a vba macro from a Function// coco Excel Programming 4 June 24th 05 11:11 PM


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