View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Protection Reminder

Colin,

You could try this:-

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim sht As Worksheet
For Each sht In Sheets
sht.Select
If ActiveSheet.ProtectContents = False Then
MsgBox (sht.Name & " isn't protected")
End If
Next sht
End Sub


Alt+F11 to open VB editor. Double click 'This workbook. On the right hand
side from the dropdown select 'workbook'. In the other dropdown select
'before save and paste this code in.

Was that any use?

Mike

"Colin G" wrote:

I have used a combination of locking certain cells and then protecting
worksheet in order to prevent accidentally overwriting cells with formulae in
them. This works fine for what I want but occasionally I need to change a
formula so have to unprotect the sheet. Again, no problem but what I am
looking for is a reminder to reprotect the worksheet after I have amended the
formulae I need to change. I guess there is a macro or something I could
write but please bear with me since I am unfamiliar with writing macros.
Also, is it possible for this to be aplied to all sheets in the workbook?