PC Review


Reply
Thread Tools Rate Thread

Can we make Excel close itself without asking anything?

 
 
=?Utf-8?B?QW5kcmV3?=
Guest
Posts: n/a
 
      8th Mar 2007
Hello, friends,

An Excel app was launched and a .xls file was opened using
Miscrosoft.Office.Interop.Excel. When I tried to close Excel using
Excel.Quit(), there was an Excel message box popped up, asking if one wants
to save the changes in the opened .xls file?

Can we get rid of this message and make Excel just close itself without
asking anything, event when a user does make some changes?

Thanks a lot for your help.


 
Reply With Quote
 
 
 
 
Doug Glancy
Guest
Posts: n/a
 
      8th Mar 2007
Andrew,

Before the Excel.Quit, with the xls file (referred to here as "MyFile"):

MyFile.Close SaveChanges:=False

hth,

Doug

"Andrew" <(E-Mail Removed)> wrote in message
news:074702C4-CD1D-4071-8C21-(E-Mail Removed)...
> Hello, friends,
>
> An Excel app was launched and a .xls file was opened using
> Miscrosoft.Office.Interop.Excel. When I tried to close Excel using
> Excel.Quit(), there was an Excel message box popped up, asking if one
> wants
> to save the changes in the opened .xls file?
>
> Can we get rid of this message and make Excel just close itself without
> asking anything, event when a user does make some changes?
>
> Thanks a lot for your help.
>
>



 
Reply With Quote
 
=?Utf-8?B?V29vZCBHcmFmaW5n?=
Guest
Posts: n/a
 
      8th Mar 2007
Application.DisplayAlerts = False

make sure you turn it back on at the Workbook_Open or else you'll never get
error messages again in that file.

HTH

"Andrew" wrote:

> Hello, friends,
>
> An Excel app was launched and a .xls file was opened using
> Miscrosoft.Office.Interop.Excel. When I tried to close Excel using
> Excel.Quit(), there was an Excel message box popped up, asking if one wants
> to save the changes in the opened .xls file?
>
> Can we get rid of this message and make Excel just close itself without
> asking anything, event when a user does make some changes?
>
> Thanks a lot for your help.
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I make prevent the Validate event from going off when the user hits the Close button (the X button) or selects "Close" from the system menu? 0to60 Microsoft Dot NET Framework Forms 5 10th Sep 2008 10:46 AM
Macro to make excel close grandfilth Microsoft Excel Programming 5 20th Oct 2005 05:20 PM
Excel shoud not close all active books when clicking close button =?Utf-8?B?dGVjaG5vbWlrZQ==?= Microsoft Excel Misc 0 10th Jun 2005 05:35 PM
excel - Windows close button (x) should only close active workboo. =?Utf-8?B?Q29mZmVlQWRpY3Q=?= Microsoft Excel Setup 3 8th Feb 2005 04:30 AM
Excel 2000 Workbook close button hides instead of close Steven Robinson Microsoft Excel Misc 3 13th Aug 2003 11:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:37 PM.