PC Review


Reply
 
 
Joanne
Guest
Posts: n/a
 
      10th Feb 2008
When I am ready to close my ws, I have a button that clears all contents
so the sheet is a blank form ready for the next usage. The last command
on my 'Clear' button is Application.Quit. It always asks if I want to
save my changes. Is there a way to disable this so that it will just
quit when I click my command button?
Thanks for the info
Joanne
 
Reply With Quote
 
 
 
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      10th Feb 2008
The last sentence of the help files for Quit says this...

"If you set the Saved property for a workbook to True without
saving the workbook to the disk, Microsoft Excel will quit
without asking you to save the workbook."

So, executing this...

ThisWorkbook.Saved = True

before your Application.Quit statement should do it for you.

Rick


"Joanne" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> When I am ready to close my ws, I have a button that clears all contents
> so the sheet is a blank form ready for the next usage. The last command
> on my 'Clear' button is Application.Quit. It always asks if I want to
> save my changes. Is there a way to disable this so that it will just
> quit when I click my command button?
> Thanks for the info
> Joanne


 
Reply With Quote
 
Joanne
Guest
Posts: n/a
 
      10th Feb 2008
Thanks
MVP - VB\ wrote:

> The last sentence of the help files for Quit says this...
>
> "If you set the Saved property for a workbook to True without
> saving the workbook to the disk, Microsoft Excel will quit
> without asking you to save the workbook."
>
> So, executing this...
>
> ThisWorkbook.Saved = True
>
> before your Application.Quit statement should do it for you.
>
> Rick
>
>
> "Joanne" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > When I am ready to close my ws, I have a button that clears all contents
> > so the sheet is a blank form ready for the next usage. The last command
> > on my 'Clear' button is Application.Quit. It always asks if I want to
> > save my changes. Is there a way to disable this so that it will just
> > quit when I click my command button?
> > Thanks for the info
> > Joanne

>


 
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
DoCmd.Quit Error "The command or action 'Quit' isn't available now Syvers Microsoft Access Form Coding 1 20th Dec 2007 03:08 PM
Application.Quit / DoCmd.Quit Fails Ajandco Microsoft Access VBA Modules 4 24th Aug 2007 11:22 PM
Application.Quit / DoCmd.Quit Fails Keith Microsoft Access Form Coding 15 5th Jun 2007 07:33 PM
vba advice how 2get a input box to quit by entering the word quit+ 4 a msgbox to disp RELWOD85 Microsoft Excel Programming 2 1st Aug 2005 06:45 PM
DoCmd.Quit vs. Application.Quit MikeC Microsoft Access VBA Modules 2 6th Oct 2004 05:08 AM


Features
 

Advertising
 

Newsgroups
 


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