S
santaviga
Hi,
I have a macro below that needs recoded as it's not working, I am looking
for the macro so when I press the save button it automatically protects all
the worksheets in the workbook.
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ProtectAllSheets.protect Password:="ABCD"
End With
Application.EnableEvents = False
ThisWorkbook.Save
Application.EnableEvents = True
End Sub
Many thanks
I have a macro below that needs recoded as it's not working, I am looking
for the macro so when I press the save button it automatically protects all
the worksheets in the workbook.
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ProtectAllSheets.protect Password:="ABCD"
End With
Application.EnableEvents = False
ThisWorkbook.Save
Application.EnableEvents = True
End Sub
Many thanks