+ Reply to Thread
Results 1 to 5 of 5

Closing Excel File After Idle Time

  1. #1
    Registered User
    Join Date
    05-10-2015
    Location
    Bucharest,Romania
    MS-Off Ver
    2010
    Posts
    14

    Lightbulb Closing Excel File After Idle Time

    Dear colleagues,

    As you know, Excel files shared on a disk sometimes can be a real pain because some user opened the file and forgot to close it, making it impossible for someone else to edit it.

    One solution comes in the form of creating a macro that Closes and Saves the Excel file after an Idle Time :


    Please Login or Register  to view this content.

    The only problem is that you have to add the code to every Excel file when created, and also you have to enable macros every time.

    My question was if it is possible to make a code that impacts ALL Excel files. (just like when someone disables drag and drop in one excel macro, then drag and drop will be disabled for all excel files)


    Thank you for your time,


    Warm regards,

    Eugeniu

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Closing Excel File After Idle Time

    You'd want to use a class to create an object that captures Application Events. You'd then save this code in an addin that's installed on all the users' machines

    Have a look at: http://www.cpearson.com/excel/appevent.aspx

  3. #3
    Registered User
    Join Date
    05-10-2015
    Location
    Bucharest,Romania
    MS-Off Ver
    2010
    Posts
    14

    Re: Closing Excel File After Idle Time

    Dear Kyle123,

    Thank you for the code . It works beautifully, but, you have to always have the excel file with the piece of code always open in order to make it work with other workbooks. Is there a way around this problem?


    Regards,

    Eugeniu

  4. #4
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Closing Excel File After Idle Time

    No. As I said, if you save it as an addin and not a workbook, it will load in the background every time you start Excel and not be visible

  5. #5
    Registered User
    Join Date
    05-10-2015
    Location
    Bucharest,Romania
    MS-Off Ver
    2010
    Posts
    14

    Re: Closing Excel File After Idle Time

    Hooray! I've managed to make the file "addin", and, using this code I've managed to load it automatically in Excel. I wounder, is there a way that I can load it automatically, from Excel, into PowerPoint also?


    Regards,

    Eugeniu

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel Idle Time Close
    By MarkSSDM in forum Excel General
    Replies: 3
    Last Post: 04-14-2015, 11:23 AM
  2. Excel tool to track Employee Logon,Logout and Idle time
    By KalyankumarMCA in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 06-18-2014, 09:07 PM
  3. Replies: 5
    Last Post: 10-24-2013, 06:18 AM
  4. Delete cell value 'c4' automatically at the time of closing the file
    By mukeshbaviskar in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-16-2013, 08:30 PM
  5. [SOLVED] Saving and closing workbook after idle time
    By bigmantitus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-04-2012, 12:11 PM
  6. Get the idle time of an excel application
    By jayender.vs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-19-2007, 02:52 PM
  7. closing 1 file at a time
    By Keith G Hicks in forum Excel General
    Replies: 4
    Last Post: 09-03-2005, 10:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1