C Cammandk Member Jan 14, 2014 #1 How can I use the value of a cell to be the password name in my code. If the value in A1 is "Password" and this is named as "PW1" how can this be placed in the code Sheet1.Protect Password = "PW1" Thank DK
How can I use the value of a cell to be the password name in my code. If the value in A1 is "Password" and this is named as "PW1" how can this be placed in the code Sheet1.Protect Password = "PW1" Thank DK
SirJB7 Excel Rōnin Jan 14, 2014 #2 Hi, Cammandk! Have you tried looking into the VBA built-in help? If not, in the immediate window (if not visible press Ctrl-G) type Protect, click on what typed and press F1. Regards!
Hi, Cammandk! Have you tried looking into the VBA built-in help? If not, in the immediate window (if not visible press Ctrl-G) type Protect, click on what typed and press F1. Regards!
Hui Excel Ninja Staff member Jan 15, 2014 #3 Worksheets("Sheet1").Protect Password = [PW1] You will need to use Worksheets("Sheet1").Unprotect Password = [PW1] to unprotect the sheet
Worksheets("Sheet1").Protect Password = [PW1] You will need to use Worksheets("Sheet1").Unprotect Password = [PW1] to unprotect the sheet
C Cammandk Member Jan 15, 2014 #4 Hi Hui I had found a solution - 'Sheet28.Unprotect Password:=CStr(Sheets("CMSetup").Range("PWFloats").Value) Yours is much more elegant. Thanks [SOLVED]
Hi Hui I had found a solution - 'Sheet28.Unprotect Password:=CStr(Sheets("CMSetup").Range("PWFloats").Value) Yours is much more elegant. Thanks [SOLVED]