Unprotected sheet warning

Masoud9

New Member
Joined
Feb 26, 2019
Messages
2
Hi everyone,

I have a sheet which has to be partially protected (with some cells always editable) and, sometimes, I unprotect it to change a formula. It is very important for me not to forget that I must protect the sheet again.

I would like to have some kind of Pop-Up that warn me when I close the file without protecting, or, at least, some visual signal that indicates that the sheet is unprotected.

I would very much appreciate some help in how to achieve this.
Thank you!
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Welcome to the Board!

The simplest thing would be to add some BeforeClose event procedure VBA code that runs whenever the workbook is prompted to be closed that asks "Did you remember to re-protect the sheet?".
The only caveat is it will only work if VBA is enabled (as it true for any VBA code).

See here: https://docs.microsoft.com/en-us/office/vba/api/excel.workbook.beforeclose
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,854
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top