Hi all,

Something tells me this is a Microsoft Bug and I'm SOL, but let's see if anyone see's something that I'm not.

I have workbook with protected sheets, that is also shared using a sharing password. I need to run macros to do various sorts. In order to run my macros, I simply have VBA unshare my workbook, unprotect the sheet, run my macro, reprotect the sheet, and then reprotect and share the workbook using "ProtectSharing". And it works! Sort of...

After running the macro the sheet appears to be [shared] based on the title bar, and my understanding is that the "ProtectSharing" method protects AND saves (though it didn't work when I added an additional "ActiveWorkbook.Save" line either). If I then follow this procedure below (exactly if you want to reproduce the problem), the sheet re-opens and is NOT shared!!!

1. run macro - sheet is shared and saved
2. close the worksheet but leave excel open
3. close excel
4. open excel
5. re-open the workbook using "Recent Workbooks"
6. File will open but is not shared anymore.

Here's the code I used:

Please Login or Register  to view this content.