"Getting Rid Of Save Prompt On Quit Command"

G

Guest

Hi There,

I have the following code to close down Excel assigned to a button on a
Userform:

Private Sub CmdBn3_Click()

On Error Resume Next

Application.ScreenUpdating = False
For n = 2 To 24
Sheets(n).Visible = xlVeryHidden
Next
Application.ScreenUpdating = True
ThisWorkbook.Save
Application.Quit

End Sub

I would like to disable the prompt message that appears when the code gets
to "Application.Quit"? The file, along with all changes that have been made,
has already been saved by the "Thisworkbook.Save" command.

TIA

Don
 
G

Guest

The msg window that I'd like to get rid of is "Do you want to save the
changes made to 'xxxxxxxxxx.xls'?" Again, the file has already been saved by
the previous command.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top