Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Runtime error 57121
Try qualifying the worksheets:
For Each WkSht in Worksheets becomes: For Each WkSht in Me.Worksheets Henk wrote: To unprotect my entire workbook on opening, I start on ThisWorkbook the following procedure : Private Sub WorkBook_Open() Application.ScreenUpdating = False For Each WkSht in Worksheets WkSht.Unprotect Password:="mypassword" Next WkSht I have a lot of workbooks with this procedure fuctioning properly, however there is one which each time results in Runtime error 57121 : Applikcation-defined or object-defined error. Debugging points me to the line : WkSht.Unprotect Password:="mypassword" (In the same workbook I have a macro, using the same code, wich is working without errors.) Any idea how to solve this? -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
xpath error? Runtime Error 13 type mismatch | Excel Discussion (Misc queries) | |||
xpath error? Runtime Error 13 type mismatch | Excel Discussion (Misc queries) | |||
Runtime error '1004' General ODBC error | New Users to Excel | |||
Excel 2003 Macro Error - Runtime error 1004 | Excel Discussion (Misc queries) | |||
Runtime Error 9 | Excel Discussion (Misc queries) |