MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Saving upon exiting

Posted by M Walker on July 30, 2001 6:44 AM


Is there a way of saving the workbook upon exiting userforms, overwriting existing files without promt?



Posted by Rob Jackson on July 30, 2001 7:18 AM

If you have a close button, use the line
windows(name).close savechanges:=true
this will close workbook after saving changes.
Another option is in the terminate event of the userform, put in a workbooks(name).save

Hope this helps.

By the way if you want to disable the X close buton on the top of the form, Use the Query Close event.