ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Excel 2007 Protect Workbook issue (https://www.excelbanter.com/excel-worksheet-functions/150606-excel-2007-protect-workbook-issue.html)

newbie

Excel 2007 Protect Workbook issue
 
I've established that whenever I use the code...

ActiveWorkbook.Protect Password:="password"

....it seems to disable the macros in the workbook. This takes effect once
you have saved, closed the file, then re-opened it. However, I find that I
cannot enable the macros anymore and the workbook then becomes un-usable.

If anyone has two minutes spare, could they please try this out in a NEW
Excel 2007 file and tell me whether it's happening to them, or whether I am
just going mad!!!

Steps-to-take:
(1) Create a new .XLSM file and add the above code. Run it a few times, then
save and close the file.
(2) Re-open the file and, bam, it don't work!

Thanks in advance,
Paul.


All times are GMT +1. The time now is 06:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com