ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Password Protect Worksheet (https://www.excelbanter.com/excel-programming/334432-password-protect-worksheet.html)

r wilcox

Password Protect Worksheet
 
If I enter the following code, my sheet is password protected

ActiveSheet.Protect ("password")

If I expand on it with either of the following, I get a code error.

ActiveSheet.Protect ("password") DrawingObjects:=False
ActiveSheet.Protect DrawingObjects:=False ("password")

What is the correct format?

Thanks.

ben

Password Protect Worksheet
 
ActiveSheet.Protect DrawingObjects:=False, password:="password"


--
When you lose your mind, you free your life.


"r wilcox" wrote:

If I enter the following code, my sheet is password protected

ActiveSheet.Protect ("password")

If I expand on it with either of the following, I get a code error.

ActiveSheet.Protect ("password") DrawingObjects:=False
ActiveSheet.Protect DrawingObjects:=False ("password")

What is the correct format?

Thanks.



All times are GMT +1. The time now is 07:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com