Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Modifying Locked Cells... :-)
blc,
Yes is the simple answer to your question. if you password protect a sheet you can fleetingly unprotect it using code in the following way 1st collect the new value for a cell by using a text box Sub Button1_Click() msg = "Enter new value" response = InputBox(msg) worksheets("Sheet1").unprotect password:="yourpassword" worksheets("Sheet1").cells(10,10).text=response worksheets("Sheet1").protect password:="yourpassword" End Sub In this way the sheet is only fleetingly unprotected. Be warned even the mildest of attacks will crack security like this Mike "blc" wrote in message ... Hello all, Quick question: Is there any way to lock or protect cells so users cannot edit/modify their contents *YET* still be able to "programatically" edit/modify the contents of those same locked or protected cells??? Any help would be appreciated... Thank you in advance, blc |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Modifying Locked Cells... :-)
Thanks!
blc -----Original Message----- blc, Yes is the simple answer to your question. if you password protect a sheet you can fleetingly unprotect it using code in the following way 1st collect the new value for a cell by using a text box Sub Button1_Click() msg = "Enter new value" response = InputBox(msg) worksheets("Sheet1").unprotect password:="yourpassword" worksheets("Sheet1").cells(10,10).text=response worksheets("Sheet1").protect password:="yourpassword" End Sub In this way the sheet is only fleetingly unprotected. Be warned even the mildest of attacks will crack security like this Mike "blc" wrote in message ... Hello all, Quick question: Is there any way to lock or protect cells so users cannot edit/modify their contents *YET* still be able to "programatically" edit/modify the contents of those same locked or protected cells??? Any help would be appreciated... Thank you in advance, blc . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Locked worksheet & hyperlinks (w/ select locked cells unchecked) | Excel Discussion (Misc queries) | |||
Protecting Cells from changing or modifying long formulas | Excel Discussion (Misc queries) | |||
Modifying multiple cells crash | Excel Discussion (Misc queries) | |||
Put comments on a locked spreadsheet even though cells not locked | Excel Worksheet Functions | |||
Modifying UnProtected Cells | Excel Discussion (Misc queries) |