I have a workbook in which i have several sheets according to requirement. In this workbook i have used macros and to lock some particular cells and columns i have used unprotect and protect options. Everything works fine on my machine but when i make it as SharedWorkBook it is giving me errors particularly the ThisWorkBook.Sheets("PSE").Unprotect and ThisWorkBook.Sheets("PSE").Protect statements. So in place of them i used ThisWorkBook.Sheets("PSE").UnprotectSharing and ThisWorkBook.Sheets("PSE").ProtectSharing . Even now also i am getting errors with those lines.
Sub SheetHider()
ThisWorkbook.Sheets("SheetA").UnprotectSharing
Cuser = ThisWorkbook.Sheets("SheetA").Range("A2").Value
and the error is
Runtime error '438' Object doesn't support this property or method.
My Requirement: 1)I have to use Macros, Locking property so that i have to use Unprotect and Protect statements and these things should work when i make it as SharedWorkBook.
I have been searching many sites for this for a week. Atleast give me some alternatives to do this.
Any help will be appreciated greatly. Thanks