Protect a worksheet with a password. No modifications possible unless the user has the password.
Code:
Sub protect_sheet()
'protect sheet with password
Dim ws_sheet As Worksheet
Dim myPassword As String
'identify sheet
Set ws_sheet = Worksheets(1)
'set password
myPassword = "KevinBrundu"
'protect
ws_sheet.Protect (myPassword)
End Sub
-------------------------------
NEED HELP?
-------------------------------
Leave a comment with your questions, issues or projetcs and I will try to answer with a video.
-------------------------------
THANK YOU
-------------------------------
For watching my videos,
Your shares
And your comments!