View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Unwanted prompts when clsoing a workbook

Sub terminatt()
Application.DisplayAlerts = False
ActiveWorkbook.Saved = True
ActiveWorkbook.Close
End Sub
--
Gary''s Student - gsnu200825


"Eivind" wrote:

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.