PC Review


Reply
Thread Tools Rate Thread

Autoclose excel file after x minutes of inactivity

 
 
Hardhit
Guest
Posts: n/a
 
      7th Mar 2008
Hello,

Is there a possibility to automatically close an excel file after for
example 5 minutes of inactivity on the file ?

We have at our company for each department a file in which they need to fill
in production data. 2 times per day this data is collected into an overview
file.
But I often have to call the departments to ask them to close the file so
that I can run the collection macro's.

Regards,
Peter
 
Reply With Quote
 
 
 
 
john
Guest
Posts: n/a
 
      7th Mar 2008
Not sure about detecting inactivity using VBA but one route may be to
consider adding an OnTime routine which would call a procedure to close the
workbook after 5 mins or whatever you want - However, this does rely on users
enabling macro's.

Chip Pearson has some woking examples:
http://www.cpearson.com/excel/OnTime.aspx
--
JB


"Hardhit" wrote:

> Hello,
>
> Is there a possibility to automatically close an excel file after for
> example 5 minutes of inactivity on the file ?
>
> We have at our company for each department a file in which they need to fill
> in production data. 2 times per day this data is collected into an overview
> file.
> But I often have to call the departments to ask them to close the file so
> that I can run the collection macro's.
>
> Regards,
> Peter

 
Reply With Quote
 
Mike H.
Guest
Posts: n/a
 
      7th Mar 2008
Perhaps a better way would be to have the spreadsheet auto-save when new data
is entered in it. Then it wouldn't really matter if they closed it or not.
You could open it read-only and get the data out. To do this you could set
up a counter that counts entries, read that # when you first open the
spreadsheet and when it changes initiate a save routine.

An even better solution would be to write the data to an external
data-source like an access file. Then you wouldn't care if they were in the
spreadsheet or not because you would read the data out of access (or you
could read it in excel but it would be stored in Access). There are examples
for doing this on this discussion gruop, or I could set it up for you.

 
Reply With Quote
 
Sandy Mann
Guest
Posts: n/a
 
      7th Mar 2008
> workbook after 5 mins or whatever you want - However, this does rely on
> users
> enabling macro's.


In addition if the sheet is left in edit mode the macro will not run either.

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(E-Mail Removed)
Replace @mailinator.com with @tiscali.co.uk


"john" <(E-Mail Removed)> wrote in message
news:43301639-2929-4DF8-984D-(E-Mail Removed)...
> Not sure about detecting inactivity using VBA but one route may be to
> consider adding an OnTime routine which would call a procedure to close
> the
> workbook after 5 mins or whatever you want - However, this does rely on
> users
> enabling macro's.
>
> Chip Pearson has some woking examples:
> http://www.cpearson.com/excel/OnTime.aspx
> --
> JB
>
>
> "Hardhit" wrote:
>
>> Hello,
>>
>> Is there a possibility to automatically close an excel file after for
>> example 5 minutes of inactivity on the file ?
>>
>> We have at our company for each department a file in which they need to
>> fill
>> in production data. 2 times per day this data is collected into an
>> overview
>> file.
>> But I often have to call the departments to ask them to close the file so
>> that I can run the collection macro's.
>>
>> Regards,
>> Peter

>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
WIN XP locks up after a few minutes of inactivity =?Utf-8?B?VFMmRVNSUg==?= Windows XP Performance 4 17th Oct 2006 03:39 PM
Hang up after 15 minutes of inactivity Silvio Galli Windows XP Performance 19 28th Nov 2005 06:47 AM
Logoff after X minutes of inactivity...? Kenneth Microsoft Windows 2000 3 9th Mar 2005 01:15 PM
XP shuts down after 15 minutes of inactivity Jani Ahti Windows XP Configuration 2 13th Jul 2004 11:36 PM
CLOSE MS ACCESS APP AFTER 'X' MINUTES OF INACTIVITY Jim Bonacorda Microsoft Access VBA Modules 1 10th Sep 2003 09:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:34 AM.