Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protecting sheet in a macro doesn't work
I have a macro that moves data from one sheet to another. It is necessary to
unprotect sheets during the data move, then re-protect them after. I protect the sheets manually before running the macro, using the same password the macro uses. But after the macro has run, I find I can unprotect the sheet by hitting ToolsProtectionUnprotect sheet, and it does not ask for a password; it goes ahead and unprotects the sheet. Prior to running the macro, it does ask for the password before unprotecting the sheet. The macro definitely is reprotecting with the same password. Need to solve this to protect formula cells in one sheet, and data in the other. I've also tried not protecting them manually at all, just letting the macro do it. Same result. This is what I'm using in the macro: ActiveSheet.Protect Password:="XXXXX" ActiveSheet.Unprotect Password:="XXXXX" |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro for protecting sheet | Excel Discussion (Misc queries) | |||
Protecting sheet that has macro | Excel Worksheet Functions | |||
Macro not protecting every sheet | Excel Programming | |||
why doesn't sort work when it's choosen before protecting sheet | Excel Worksheet Functions | |||
macro for Protecting a Sheet | Excel Discussion (Misc queries) |