+ Reply to Thread
Results 1 to 3 of 3

How do I close a workbook without prompting to save file?

  1. #1
    Forum Contributor rkjudy's Avatar
    Join Date
    03-31-2009
    Location
    Longview, TX
    MS-Off Ver
    MS Office 2010
    Posts
    239

    How do I close a workbook without prompting to save file?

    I'm having a problem getting a workbook to close without asking for a save. I posted this question before and was told to enter this code in the "ThisWorkbook" module.

    Please Login or Register  to view this content.
    This worked for a day or so and then quit working. What has happened or is the the wrong code to make the sheet close without asking to Save?
    Last edited by rkjudy; 05-07-2014 at 05:14 PM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: How do I close a workbook without prompting to save file?

    Is this solved?

    If you solve a problem yourself before anyone else has responded, please take a moment to describe your solution, chances are some other member will benefit.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: How do I close a workbook without prompting to save file?

    Hi, rkjudy,

    any Auto_Open or Auto_Close procedures belong into a standard module and not into ThisWorkbook where Workbook_Open or Workbook_Close should be used.

    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

+ 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] How do I close a workbook without prompting to save file?
    By rkjudy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-05-2014, 06:31 PM
  2. Replies: 1
    Last Post: 10-25-2013, 06:10 PM
  3. Replies: 0
    Last Post: 08-21-2013, 12:09 PM
  4. [SOLVED] File closes without prompting to save
    By freyabeads in forum Excel General
    Replies: 0
    Last Post: 03-01-2006, 09:10 AM
  5. [SOLVED] [SOLVED] Close Excel file without prompting user to save
    By JDay01 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-10-2005, 05:06 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