Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
MAS MAS is offline
external usenet poster
 
Posts: 19
Default Auto / Timed Closure

Hi,

I have played with this one for hours but its driving me mad..

I have read/write access to a workbook that I access via an internal
network. If It's not already open in write mode by one of the other 3
terminals that have the same read/write access, I can only open it in read
only until prompted that whoeven had it open in write mode has now closed
it. Every terminal can have it open in read only mode without it affecting
the write access.

The problem is that sometimes, the workbook gets left open in write mode and
forgotten about because its minimised or hidden behind another application,
meaning I have to go search for where its open in write mode and close it
myself.

What I want to do is create a timeout so that when the workbook has not had
focus for say 10 minutes, it saves any changes and closes.

This must only happen on the terminal that had the workbook in write mode
and those who had it in read only mode should be unaffected..

Good one Eh ?

Any ideas most welcome.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Auto / Timed Closure

Look at help for application.Ontime on Chip Pearson's site:

http://www.cpearson.com/excel/ontime.htm

Use it with the workbook level selectionchange event.
http://www.cpearson.com/excel/events.htm

Each time a selection is made, cancel any pending ontime event that will
close the workbook and schedule a new one for 10 minutes hence. If the
workbook is open in readonly mode (check the property), then do nothing.
If you want to check whether it is in the foreground, you would need to use
the windows api to do that I believe.

--
Regards,
Tom Ogilvy


"MAS" wrote in message
...
Hi,

I have played with this one for hours but its driving me mad..

I have read/write access to a workbook that I access via an internal
network. If It's not already open in write mode by one of the other 3
terminals that have the same read/write access, I can only open it in read
only until prompted that whoeven had it open in write mode has now closed
it. Every terminal can have it open in read only mode without it affecting
the write access.

The problem is that sometimes, the workbook gets left open in write mode

and
forgotten about because its minimised or hidden behind another

application,
meaning I have to go search for where its open in write mode and close it
myself.

What I want to do is create a timeout so that when the workbook has not

had
focus for say 10 minutes, it saves any changes and closes.

This must only happen on the terminal that had the workbook in write mode
and those who had it in read only mode should be unaffected..

Good one Eh ?

Any ideas most welcome.




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
Need closure CTURNER82 New Users to Excel 3 February 11th 09 09:37 PM
Save document on closure slavenp Excel Discussion (Misc queries) 1 October 30th 07 01:19 PM
Unexpected closure of Excel Chris A Links and Linking in Excel 1 August 31st 06 08:09 PM
Text file closure dsan Excel Programming 3 January 12th 04 09:12 AM
Mandatory cell check before closure Simon Excel Programming 2 November 21st 03 12:57 PM


All times are GMT +1. The time now is 03:45 AM.

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"