+ Reply to Thread
Results 1 to 3 of 3

Close workbook but not save

  1. #1
    Forum Contributor
    Join Date
    10-03-2016
    Location
    Sydney, Australia
    MS-Off Ver
    MS 365
    Posts
    128

    Close workbook but not save

    Hi there,

    I have a workbook where I have it close automatically at 6:30pm every day.

    Below is the current code I have:

    Code in "ThisWorkbook":
    Please Login or Register  to view this content.
    Code in "Module":
    Please Login or Register  to view this content.
    However, I do not want the workbook saved at all, I want it to just close without saving. Is the above correct or does something need to be changed to prevent the workbook from saving before exiting?

    Thanks

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Close workbook but not save

    use this instead?
    Thisworkbook.Close SaveChanges:=False
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Close workbook but not save

    Maybe :
    Please Login or Register  to view this content.
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

+ 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. Save the current worrkbook, save the sheet as .csv and close the workbook
    By SpeediWeb in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-10-2015, 06:50 AM
  2. VBA Auto-save and close workbook
    By Jannekene in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-17-2015, 06:47 AM
  3. Save workbook, attach it to outlook email, close workbook?
    By Jasonhouse in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-27-2014, 11:52 PM
  4. How to open,save and close another workbook from the current workbook using macro?
    By ravikumar00008 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-15-2012, 10:42 AM
  5. Save and close a workbook using VBA
    By Kimberly123 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 05-23-2012, 09:33 AM
  6. Close workbook and save as.
    By Hjahren in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-13-2010, 04:41 AM
  7. Help on Workbook close and workbook save events
    By Adam Harding in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-29-2005, 12: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