Hi I have a Function that uses the following lines of code (a) on entry to the Function and (b) on exit of the function. The code stops working when I share the workbook it throws this error
"Unprotect method of WorkSheet class failed"
(a)ActiveWorkbook.Worksheets("aSheet.xls").Unprotect Password:=aPassword
(b) ActiveWorkbook.Worksheets("aSheet.xls").Protect Password:=aPassword
Do I have to change the code when working with a shared workbook ? If so how ?
Thanks
Bookmarks