ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Password from cell (https://www.excelbanter.com/excel-programming/426850-password-cell.html)

Kashyap

Password from cell
 
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..

Jacob Skaria

Password from cell
 
ActiveWorkbook.Sheets("Sheet3").unprotect Range("P1")

If this post helps click Yes
---------------
Jacob Skaria


"Kashyap" wrote:

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..


Jacob Skaria

Password from cell
 
strPassword = ActiveWorkbook.Sheets("Sheet3").Range("P1")
ActiveWorkbook.Sheets("Sheet3").Unprotect strPassword

If this post helps click Yes
---------------
Jacob Skaria


"Kashyap" wrote:

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..



All times are GMT +1. The time now is 04:45 PM.

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