Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Close Workbook After 10 Minutes

What I would like to do is if there has been no activity on the workbook for
10 minutes it will save and close automatically. Any pointers most
appreciated.

Taffy


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Close Workbook After 10 Minutes

Paul B. gave you code to do what you asked, but I'd be a little careful
implementing this.

If I open a workbook and make a bunch of changes and realize that I don't want
to save the changes, you're code will save it when it closes. This could be a
mild irritant or a big old problem--depending on how much stuff was lost.

And closing without saving represents the opposite end of the spectrum. If I
spend 8 hours making changes without saving and your code closes without saving,
you might have a disgruntled user chasing you.

Whatever you do, make sure your users know what's going to happen.




Taffy wrote:

What I would like to do is if there has been no activity on the workbook for
10 minutes it will save and close automatically. Any pointers most
appreciated.

Taffy


--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Close Workbook After 10 Minutes

Paul B thanks, does exactly what it says on the tin.

Dave, thanks for the comments. The workbook is being used by three
different people in different buildings. They only have to enter a number
and print of a chart each day, should hear the moaning when one of them
leaves the workbook open.

More help

Is it possibe to have a message box open 30 seconds before closing the
workbook MsgBox "This workbook will auto-close in 30 seconds"
with a OK and Cancel button with a timer ticking down?

This message box should come to the front of all open windows.

Or should this be in a new post?

Thanks Taffy


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Close Workbook After 10 Minutes

You could do this code (from Jim Rech):

Sub SelfClosingMsgBox()
CreateObject("WScript.Shell").Popup "Hello", 30, _
"This closes itself in 30 seconds"
End Sub

I tested it by running this:

Sub aaa()
Application.OnTime Now + TimeSerial(0, 0, 20), "selfclosingmsgbox"
End Sub



It popped up over other windows in my test--win98, though. I'm not sure how all
versions of windows will handle it.



Taffy wrote:

Paul B thanks, does exactly what it says on the tin.

Dave, thanks for the comments. The workbook is being used by three
different people in different buildings. They only have to enter a number
and print of a chart each day, should hear the moaning when one of them
leaves the workbook open.

More help

Is it possibe to have a message box open 30 seconds before closing the
workbook MsgBox "This workbook will auto-close in 30 seconds"
with a OK and Cancel button with a timer ticking down?

This message box should come to the front of all open windows.

Or should this be in a new post?

Thanks Taffy


--

Dave Peterson

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
close a workbook after 5 minutes Marilyn Excel Discussion (Misc queries) 15 September 18th 08 08:44 PM
Option in Excel to save a close a workbook inactive for 5 minutes Patricia Peterson Excel Discussion (Misc queries) 4 January 5th 06 05:00 PM
Close a the current workbook and load another specified workbook Adrian[_7_] Excel Programming 4 August 7th 04 05:29 PM
Close a workbook Mike G. Excel Programming 1 June 1st 04 06:50 PM
How can I close a workbook using VBA? Trevor[_4_] Excel Programming 2 March 2nd 04 01:12 AM


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