Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
sharing and protecting incompatible?
Hi,
I'd like to share a workbook made of 3 sheets. However, I'd like to protect one of the sheets as its content is made up via macros with the data from the first two sheets. Unfortunately, the macro will return an error message: "Unprotect method of Worksheet class failed" Run-time error '1004' The macro begins with the following code: Sheets("Database").Select ActiveSheet.Unprotect If I don't share the workbook, the macro works fine. Is it possible for the macro to unprotect the workbook in order to perform the data handling? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
sharing and protecting incompatible?
Changing the protection of a worksheet in a shared workbook is not allowed.
But this is documented in Excel's help. Look for: Features that are unavailable in shared workbooks for a big list. wrote: Hi, I'd like to share a workbook made of 3 sheets. However, I'd like to protect one of the sheets as its content is made up via macros with the data from the first two sheets. Unfortunately, the macro will return an error message: "Unprotect method of Worksheet class failed" Run-time error '1004' The macro begins with the following code: Sheets("Database").Select ActiveSheet.Unprotect If I don't share the workbook, the macro works fine. Is it possible for the macro to unprotect the workbook in order to perform the data handling? -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
sharing and protecting incompatible?
A colleague gave me the solution:
The worksheet was protected to prevent writing, but needed unprotection to do a "find and replace". Solution, unlock the relevant column for the "find and replace", therefore, the macro doesn't need to unprotect the entire sheet. All columns are protected but that one. case closed :-) PUBA |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can't edit a Comment, not protecting, not sharing | Excel Discussion (Misc queries) | |||
Sharing and protecting sections of a worksheet. | Excel Discussion (Misc queries) | |||
.csv incompatible message after saving | Excel Worksheet Functions | |||
Macros incompatible for different versions? | Excel Programming | |||
Incompatible Code | Excel Programming |