VBA protect unprotect worksheet syntax

Folks,
I would appreciate what the connect syntax is to protect and unprotect a worksheet using VBA. What I have below doesn't work.

    Worksheet("Menu").Protect Password:="123"

Open in new window

Frank FreeseAsked:
Who is Participating?
 
Jorge PaulinoIT Pro/DeveloperCommented:
Then use the unprotect method for the oposite:

Worksheets("Menu").Unprotect Password:="123"
0
 
Jorge PaulinoIT Pro/DeveloperCommented:
Is missing a "s" in the Worksheet ... it's Worksheets


Worksheets("Menu").Protect Password:="123"
0
 
Frank FreeseAuthor Commented:
thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.