Re: VBA - closing without saving changes

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Don Guillett (donaldb_at_281.com)
Date: 04/21/04


Date: Wed, 21 Apr 2004 15:16:58 -0500

try
ActiveWorkbook.Close saveD=true

OR
This example closes the workbook that contains the example code and discards
any changes to the workbook by setting the Saved property to True.

ThisWorkbook.Saved = True
ThisWorkbook.Close

-- 
Don Guillett
SalesAid Software
donaldb@281.com
"ajliaks >" <<ajliaks.152wok@excelforum-nospam.com> wrote in message
news:ajliaks.152wok@excelforum-nospam.com...
> Hi,
>
> This is very simply!
>
> I am using the instruction
>
> ActiveWorkbook.Close
>
> to close file.
>
> I need the macro cloosing the active workbook without asking for saving
> changes. I need closing without saving changes!
>
> How can I do?
>
> Thanks,
>
>
> ---
> Message posted from http://www.ExcelForum.com/
>


Relevant Pages

  • RE: Close Excel file without prompting user to save
    ... This example closes the workbook that contains the example code and discards ... You can look up the saved property if you need more explanation... ... What can I do to force Excel to close ...
    (microsoft.public.excel.programming)
  • Exit Excel programmatically
    ... Excel to ask the user about saving changes (to the workbook). ... save it, then close or exit. ...
    (microsoft.public.excel.programming)
  • Re: Exit Excel programmatically
    ... If you close the workbook how can the macro continue to fire? ... > Excel to ask the user about saving changes. ... > save it, then close or exit. ...
    (microsoft.public.excel.programming)
  • Re: Kick someone out of a Spreadsheet
    ... 'Set StartTime when the workbook is opened. ... Dim NewTime As Single ... The code above is set to close the workbook without saving changes if it is ...
    (microsoft.public.excel.misc)
  • Re: Opens multiple versions of workbook
    ... You've got two windows open in the same workbook. ... Then save before closing, then reopen the file. ... and saving changes to one saves the changes to both. ... Any help on how to stop Excel from opening two versions is ...
    (microsoft.public.excel.misc)