+ Reply to Thread
Results 1 to 4 of 4

Name of File.xls: Disable Save

Hybrid View

  1. #1
    Registered User
    Join Date
    12-11-2006
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    86

    Name of File.xls: Disable Save

    Hello!

    Is there a piece of code that I can use that will stop the following warning message from appearing when I hit the X button?

    "Do you want to save the changes you made to 'Name of File.xls'?

    Thank you

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    ThisWorkbook.Saved = True
    will tell (lie to) the machine that it has been saved, so it won't ask you.

  3. #3
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,565
    Hi There,

    Always glad to try and help a fellow Aussie!!

    The following code should do the trick:

    Sub Auto_Close
    ActiveWorkbook.Close SaveChanges:=False
    End Sub
    HTH

    Robert

  4. #4
    Registered User
    Join Date
    12-11-2006
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2007
    Posts
    86
    Thank you both very much!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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