Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2006

Tip: Looking for answers? Try searching our database.

Systematically Close File, Without Saving Changes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MWS - 20 Mar 2006 15:49 GMT
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
Tom Ogilvy - 20 Mar 2006 15:51 GMT
ActiveWorkbook.Close SaveChanges:=False

Signature

Regards,
Tom Ogilvy

> 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
David C - 20 Mar 2006 16:57 GMT
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.

> ActiveWorkbook.Close SaveChanges:=False
>
[quoted text clipped - 3 lines]
> >
> > Thanks in advance
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.