ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   save changes on close using vba (https://www.excelbanter.com/excel-programming/391199-save-changes-close-using-vba.html)

Carlee

save changes on close using vba
 
Hi All,

How can i programmatically save all changes made in a workbook, such that MS
Excel doesn't prompt the user before they close the workbook?

--
Carlee

FSt1

save changes on close using vba
 
hi
in a thisworkbook module, paste this.
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveWorkbook.Save
End Sub
everytime someone closes the file excel will save it whether it needs saving
or not.

regards
FSt1

"Carlee" wrote:

Hi All,

How can i programmatically save all changes made in a workbook, such that MS
Excel doesn't prompt the user before they close the workbook?

--
Carlee



All times are GMT +1. The time now is 04:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com