Protect a tab but retain collapse/expand column functionality

LonnyR

New Member
Joined
Sep 24, 2020
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Hello Excel gurus - Is there a way I can password protect a tab but still retain expand/collapse functionality? I need to be able to prevent users from deleting cells, columns, rows, and protect formatting and formulas but need to allow users to be able to expand and collapse columns.

1600962584683.png
 

Attachments

  • 1600962574570.png
    1600962574570.png
    1.7 KB · Views: 2

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Add this code in the ThisWorkbook Module:

VBA Code:
Private Sub Workbook_Open()

    With Sheet1   '<= change name as required.
        .Protect UserInterfaceOnly:=True
        .EnableOutlining = True
    End With

End Sub
 
Upvote 0
Add this code in the ThisWorkbook Module:

VBA Code:
Private Sub Workbook_Open()

    With Sheet1   '<= change name as required.
        .Protect UserInterfaceOnly:=True
        .EnableOutlining = True
    End With

End Sub
Thank you!
 
Upvote 0

Forum statistics

Threads
1,215,301
Messages
6,124,142
Members
449,144
Latest member
Rayudo125

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top