+ Reply to Thread
Results 1 to 2 of 2

Auto Answer "save changes" in a BeforeClose Event

  1. #1
    Registered User
    Join Date
    04-29-2005
    Posts
    45

    Auto Answer "save changes" in a BeforeClose Event

    I have other actions taking place in my workbook under the BeforeClose event. After these take place, excel prompts the user to save or not to save.


    I would like to answer no to this question.

    I have tried "ThisWorkbook.Close savechanges:=False" and it causes other parts of the BeforeClose event not to work.

    If I change the application settings, such as "Application.DisplayAlerts = False", I think that it effects all other workbooks that excel opens in the future.


    Help!!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello TEAM,

    To prevent Excel from prompting you to save, set the workbook property .Saved to True.

    Example to Prevent Save Prompt:
    'The Active Workbook
    Workbook.Saved = True

    When the Close Event fires, Excel checks this property to determine if any changes have been made to file. If true, it prompts the user whether to save or not.

    Sincerely,
    Leith Ross

+ 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