+ Reply to Thread
Results 1 to 5 of 5

Auto Close a Workbook With or With Out Saving

  1. #1
    Registered User
    Join Date
    12-04-2013
    Location
    SC
    MS-Off Ver
    Excel 2010
    Posts
    10

    Auto Close a Workbook With or With Out Saving

    I am working on the code below that would auto close the workbook after X amount of time of inactivity. What am seeing is the code seems to be not following the timer and closing. And if it does close it tries to re-open the workbook. What I'm trying to prevent is the user leaving the workbook open and preventing a second user from entering information.

    Could someone please help me with this code?
    Last edited by sat-65; 12-27-2013 at 04:24 PM.

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Auto Close a Workbook With or With Out Saving

    Post deleted
    Last edited by Winon; 12-27-2013 at 03:33 PM. Reason: Code tags were applied as requested
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Registered User
    Join Date
    12-04-2013
    Location
    SC
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Auto Close a Workbook With or With Out Saving

    I do apologize for the in accurate posting of the code. Still kind the new to all this. I hope this is viewed acceptable.

    I have this code in "ThisWorkbook"

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    I have this code posted in "Module2"

    Dim DownTime As Date


    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Last edited by sat-65; 12-27-2013 at 01:12 PM.

  4. #4
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Auto Close a Workbook With or With Out Saving

    Hello sat-65,

    Sorry but it is still wrong. Please follow the steps as outlined in Post #2, and try again.

    You don't have to re-post again. Just go to your Posts, click on Edit Post, then Highlight the Code bit, and then click on #. After that you click on Save Changes.

    Regards

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Auto Close a Workbook With or With Out Saving

    Hello sat-65,

    Thank you for adding Code tags to your second post. You may now delete your first post, or add the code tags there as well.

    please see this link: http://www.excelforum.com/excel-prog...nactivity.html

    Regards.

+ 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. [SOLVED] Close another workbook without saving
    By D_N_L in forum Excel Programming / VBA / Macros
    Replies: 34
    Last Post: 12-24-2013, 11:00 AM
  2. Close workbook without saving after msg box
    By RebeccaEllis in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-22-2012, 08:41 AM
  3. Close a workbook without saving
    By preciouslife73 in forum Excel General
    Replies: 2
    Last Post: 01-14-2012, 08:16 PM
  4. Close workbook with out saving (Workbook_BeforeClose)
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-16-2008, 12:20 PM
  5. Saving:workbook close
    By DRANDON in forum Excel General
    Replies: 1
    Last Post: 07-28-2006, 02:15 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