close excel application.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Is there any way I can control the dialog box which prompts to save the
changes of the workbook? Basically I dont want to display the dialog box when
they user clicks on cross.

Thanks
 
Application.DisplayAlerts = False

.....

Application.DisplayAlerts = True
 
HI VJ

This what I use hope it helps

Application.AlertBeforeOverwriting = False
ThisWorkbook.Close savechanges:=False

This closes the work book with no prompt and does not save changes.

You could easily ammend the code to save with no alerts and close.

Best N10
 
..alertbeforeoverwriting refers to the warning you get when you drag cells over
non-empty cells.

Not overwriting the another file.
 

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

Back
Top