General discussion

Locked

Worksheet Protection

By Heavy Civil ·
Sometimes I have to unprotect a worksheet and when I leave to go to another worksheet, I forget to enable the protection.

What I would like to do, is write a macro that would enable the protection on this worksheet once I leave it and go on to another worksheet.

Any ideas?

Thanks

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Worksheet Protection

by DKlippert In reply to Worksheet Protection

Right click the tab and choose View Code.
On every sheet enter a macro like:

Private Sub Worksheet_Deactivate()
ActiveSheet.Protect
End Sub

See:

www.cpearson.com/excel/events.htm

Collapse -

Worksheet Protection

by Heavy Civil In reply to Worksheet Protection

Poster rated this answer

Collapse -

Worksheet Protection

by Heavy Civil In reply to Worksheet Protection

This question was closed by the author

Back to Software Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums