Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

To me, it seems like the way to edit a protected sheet is unprotect it and type some stuff in and then protect it again before sending it to someone else. What if a user forgets protecting it before sending it again? Is there a way I can always protect it?

share|improve this question
    
You could add a macro to the Save event that forces the sheet to be protected. That's the only thing I can think of. –  user3463 May 23 '12 at 23:25
    
@RandolphWest Macro-approach was what I was thinking too. –  TPR May 23 '12 at 23:26
    
My Excel macro knowledge is so rusty, I won't even try to answer this question, but that's the way I'd go about it. –  user3463 May 23 '12 at 23:27
add comment

1 Answer

You can use the macro recorder to incorporate the elements you want to make sure are protected. @Randolph West is probably right in the approach

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    ActiveWorkbook.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
    ActiveWorkbook.Protect Structure:=True, Windows:=True
End Sub
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.