I have a worksheet that has cells and charts on it. When the worksheet is unprotected everything works perfect. When I try to protect some cells, the VBA crashes on this line
The error is Run-time error '1004'. Application-defined or object defined error.
If I enter the password and unprotect the sheet, everything goes back to working. Any suggestions?
VBA Code:
ActiveSheet.ChartObjects(chartname).Activate
The error is Run-time error '1004'. Application-defined or object defined error.
If I enter the password and unprotect the sheet, everything goes back to working. Any suggestions?