I am using this code:
ActiveWindow.Close
Is there a way that when VBA closes the form, that it not come up and ask "WOuld you like to save changes to file?"
Printable View
I am using this code:
ActiveWindow.Close
Is there a way that when VBA closes the form, that it not come up and ask "WOuld you like to save changes to file?"
If it is in word then you have to save the document first.
ActiveDocument.Save 0
The zero means don't ask for changes
ActiveWindow.Close wdDoNotSaveChanges
That code does not work.
This is and Excel Workbook just a reminder. What is the code for that.
ActiveWindow.Close False 'dont save changes
ActiveWindow.Close True 'saves the changes
You are a gift from God. Thank you so much
you can also use:
Code:ActiveWindow.Close SaveChanged:=False