Hey guys,
I don't suppose anyone here is able to help me out with a problem I am having. I have a worksheet with the following code:
Anyway, when it does the first loop of calculations, it goes through fine. When it does the calculations of the sheet again. I get the run time 'error 1004 - unprotect method of worksheet class failed' message come up. It seems to me that It is able to unlock the sheet, and do the calculations, but when it locks it again it is using different settings or something, which means when it goes through it again with the standard 'ActiveSheet.Unprotect "password123"' line, its not unlocking it fully, or using the same criteria. as a result it is not unlocking the same.
Can any of you guys tell me where I am going wrong. I am using Excel 2003 unfortunately.
Many thanks
I don't suppose anyone here is able to help me out with a problem I am having. I have a worksheet with the following code:
PHP:
Private Sub Worksheet_Calculate()
If ActiveSheet.ProtectContents Then
ActiveSheet.Unprotect "password123"
........loads of IF calculation which work fine......
ActiveSheet.Protect "password123", True
End If
End Sub
Can any of you guys tell me where I am going wrong. I am using Excel 2003 unfortunately.
Many thanks