ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Force macro on save (https://www.excelbanter.com/excel-programming/364483-force-macro-save.html)

Meltad

Force macro on save
 
I want to create a macro to run when users of a shared woorbook hit save or
save as, as a way of protecting the master data set. My data will contain
many columns such as standard cost and selling prices, i only want to allow
the save if they have not corrupted formatting or data validation. Is this
possible?

I've made a start with a MsgBox code but not sure how to proceed...

NickHK

Force macro on save
 
Meltad,
There is a Workbook_BeforeSave event, so you can check if everything is OK.
If not then set Cancel=True to abort the save

NickHK

"Meltad" wrote in message
...
I want to create a macro to run when users of a shared woorbook hit save

or
save as, as a way of protecting the master data set. My data will contain
many columns such as standard cost and selling prices, i only want to

allow
the save if they have not corrupted formatting or data validation. Is this
possible?

I've made a start with a MsgBox code but not sure how to proceed...




Meltad

Force macro on save
 
Hi Nick,

Do you have anymore detail on how to use this?.. I'm a beginner!



"NickHK" wrote:

Meltad,
There is a Workbook_BeforeSave event, so you can check if everything is OK.
If not then set Cancel=True to abort the save

NickHK

"Meltad" wrote in message
...
I want to create a macro to run when users of a shared woorbook hit save

or
save as, as a way of protecting the master data set. My data will contain
many columns such as standard cost and selling prices, i only want to

allow
the save if they have not corrupted formatting or data validation. Is this
possible?

I've made a start with a MsgBox code but not sure how to proceed...






All times are GMT +1. The time now is 02:30 PM.

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