ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Locked Sheet (https://www.excelbanter.com/excel-programming/281840-locked-sheet.html)

libby

Locked Sheet
 
The easiest way I can think of is to unlock the sheet,
make the changes and lock it again.

For example
1)Unprotect the sheet
sheet1.unprotect, "password"

2)Change the formula
Sheet1.Range("a1").FormulaR1C1 = "=RC[1]+RC[2]"

3)Re-protect the sheet
sheet1.protect, "password"

If you haven't already you could in future
try "Userinterface :=true" which allows code to alter a
sheet but prevents the user from doing so.

hope this helps
libby
-----Original Message-----
I want to write a VB Code that will change the formula in
one cell on a locked sheet that is password protected? I
know the password. It is a program that several people
are using and I want to sent them an update to fix a
glitch. However, I don't know the code to change a cell
on a locked page??????

SDC
.



All times are GMT +1. The time now is 10:48 PM.

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