ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Conditional Formatting & Protected Ranges disappear after running macro (https://www.excelbanter.com/excel-discussion-misc-queries/267165-conditional-formatting-protected-ranges-disappear-after-running-macro.html)

CNP

Conditional Formatting & Protected Ranges disappear after running macro
 
I have conditional formatting and protected ranges set up in an Excel 2003 workbook. When I run a particular macro, the conditional formatting and protected ranges disappear after the macro is done running. The conditional formatting is completely gone and the entire workbook becomes protected.

The line in the VB code related to the protection is:
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

But I don’t think anywhere in the code references the conditional formatting. Please help!!

CNP

I have figured out the conditional formatting error (I had a range that was copied and pasted into another range- I formatted the destination cells instead of the first range that was being copied), but still cannot understand the protected ranges issue. Could it be the same reason? I only want certain months to be unlocked and the cells that get copied/pasted affect all 12 months. Thanks!

Quote:

Originally Posted by CNP (Post 961002)
I have conditional formatting and protected ranges set up in an Excel 2003 workbook. When I run a particular macro, the conditional formatting and protected ranges disappear after the macro is done running. The conditional formatting is completely gone and the entire workbook becomes protected.

The line in the VB code related to the protection is:
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

But I don’t think anywhere in the code references the conditional formatting. Please help!!



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

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