protection
Posted by Rayn on June 04, 2001 4:12 PM
Hi
These are 2 macros one that protects all the formulas in a sheet
and another that unprotects them. can someone please help add a password protection
pop up box, so when i press the protect macro a box appears where i can put a password
and when i press the inprotect button a box will appear asking me to deactivate the password.
Thank you
Regards
Rayn
Sub Protect()
crntcell = Selection.Address
ActiveSheet.unprotect
Cells.Select
Selection.Locked = False
On Error GoTo finish
Selection.SpecialCells(xlFormulas, 23).Select
Selection.Locked = True
finish:
ActiveSheet.Protect Contents:=True
Range(crntcell).Select
End Sub
Sub unprotect()
crntcell = Selection.Address
ActiveSheet.unprotect
Cells.Select
On Error GoTo finish
Selection.SpecialCells(xlsformulas, 23).Select
Selection.Locked = False
finish:
Range(crntcell).Select
End Sub