I’m trying to protect cells in my worksheet while maintaining the functionality of collapsing and expanding the worksheet. I’m working in Microsoft Excel 2013.
I’ve read that I need to run the following code:
Private Sub Workbook_Open()
Sheets("Sheet1").Protect Password:="", UserInterfaceOnly:=True
Sheets("Sheet1").EnableOutlining = True
End Sub
Where do I insert the code? I want to be able to have this functionality after I save, close and reopen the workbook. I don’t want to have to run the code every time. Any advice is helpful! New to this. Thank you.
I’ve read that I need to run the following code:
Private Sub Workbook_Open()
Sheets("Sheet1").Protect Password:="", UserInterfaceOnly:=True
Sheets("Sheet1").EnableOutlining = True
End Sub
Where do I insert the code? I want to be able to have this functionality after I save, close and reopen the workbook. I don’t want to have to run the code every time. Any advice is helpful! New to this. Thank you.