Discussion Locked

Excel VBA Question

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How does one avoid a pop-up question from Excel appearing in an auto-run macro, asking if the file needs to be Saved?

3 replies

by tclere

To force a save:
If ThisWorkbook.ReadOnly = False Then
ThisWorkbook.Save
End If

To skip saving:
ThisWorkbook.Close SaveChanges:=False

Hope this helps!

by fernac0a

Thanks. Now I got to figure out why Application.Quit does not close the Excel Application.

This discussion is closed to new replies.