Unwanted prompts when clsoing a workbook

E

Eivind

There are several threads on how to avoid the "Would you like to save
the changes you have made ..." pop-up box, using the
ThisWorkbook.Close (False) or ThisWorkbook.Close (True) features.
I have used this successfully, and it runs nicely on my computer. However,
when transfering the code (it's in a .xla addin) to a colleague, the
SaveChanges information is ignored, and the "Would you like to save the
changes you have made ..." pop-up box appears. Both computers run Excel 2003.
I have also tried the optional forms ThisWorkbook.Close (SaveChanges =False)
and ThisWorkbook.Close SaveChanges :=False,; it makes no difference.
Any suggestions will be greatly appreciated.
 
G

Gary''s Student

Sub terminatt()
Application.DisplayAlerts = False
ActiveWorkbook.Saved = True
ActiveWorkbook.Close
End Sub
 

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