Password from cell

  • Thread starter Thread starter Kashyap
  • Start date Start date
K

Kashyap

Hi, I was trying to lock and unlock sheet using macro and the password should
pick from a cell (P1) from the same sheet

can anyone help me with this?

Thanks..
 
strPassword = ActiveWorkbook.Sheets("Sheet3").Range("P1")
ActiveWorkbook.Sheets("Sheet3").Unprotect strPassword

If this post helps click Yes
 
Back
Top