![]() Workbooks("Book1").Protect "test123"Īnd when I run this code, it locks the “Book1” workbook.Īnd if you want to protect a workbook without a password you need to skip the “Password” argument, just like the following code. ![]() In this code, you have the workbook name first and the protection method with the password. ![]() Helpful Links: Run a Macro – Macro Recorder – Visual Basic Editor – Personal Macro Workbook Protect a Workbook with Passwordīelow is the code that you need to use to protect a workbook with a password. In this tutorial, we will learn this method in different ways and we will also learn to unprotect a workbook.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |