Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
MWS MWS is offline
external usenet poster
 
Posts: 53
Default Systematically Close File, Without Saving Changes

Hello, I have an excel program and want to give the user a method to simply
stop using the file, and close it without "saving" any of the data. Can
anyone tell me what code to use?

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Systematically Close File, Without Saving Changes

ActiveWorkbook.Close SaveChanges:=False

--
Regards,
Tom Ogilvy


"MWS" wrote:

Hello, I have an excel program and want to give the user a method to simply
stop using the file, and close it without "saving" any of the data. Can
anyone tell me what code to use?

Thanks in advance

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Systematically Close File, Without Saving Changes

I found this works for me - I wanted to close Excel without saving any (all
files were read-only anyway), but that annoying message kept popping up.

First, in the 'QUIT' subroutine, I put ActiveWorkbook.Close
SaveChanges:=False [that stopped the messages] and then in the 'Before Close'
event I put Application.Quit

Works a treat, and faster too.

"Tom Ogilvy" wrote:

ActiveWorkbook.Close SaveChanges:=False

--
Regards,
Tom Ogilvy


"MWS" wrote:

Hello, I have an excel program and want to give the user a method to simply
stop using the file, and close it without "saving" any of the data. Can
anyone tell me what code to use?

Thanks in advance

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If I close a file without saving changes, can I get the autosaved jimp Excel Discussion (Misc queries) 0 July 31st 09 01:20 AM
Close file without saving Mike Excel Programming 1 December 5th 07 02:15 AM
Programatically close a file without saving [email protected] Excel Programming 2 December 26th 04 01:23 AM
Close file without saving Roadie[_4_] Excel Programming 0 October 22nd 04 03:21 PM
Close file without saving Roadie[_3_] Excel Programming 1 October 22nd 04 02:53 PM


All times are GMT +1. The time now is 02:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"