ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Get Locked Cell Value (https://www.excelbanter.com/excel-programming/408810-get-locked-cell-value.html)

Jimbob

Get Locked Cell Value
 
I have a sheet which has several columns locked and I want to assign values
from these cells to a variable. How can this be done from one of the cells
which is not protected?

Many Thanks

dan dungan

Get Locked Cell Value
 
Hi Jimbob,

After searching this group for keywords "assign cell value to
variable" and "unprotect", I found these.

you could assign value to variable like:
myValue = Range("A2")

You may need to unprotect the sheet first:

Sheets("SheetName").Unprotect "PassWord"

And then protect the sheet:

Sheets("SheetName").Protect "PassWord"

A clearer description of your goals may generate a more complete
response.

HTH

Dan


All times are GMT +1. The time now is 11:36 PM.

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