Protect worksheet with password

Refer to the following example code to see how to protect the worksheet with a password.