thompsonchase
New Member
- Joined
- Aug 19, 2013
- Messages
- 1
I am using VBA to allow users to Expand/Collapse columns in a protected sheet but it is over-riding the ability to filter a table. If I right click on the tab, unprotect the sheet, click the box so users can filter, and then protect the sheet again everything works fine, but once I save, exit, and re-open the problem is back.
The code I am using is below. Any help is appreicated.
I placed the code in the section labled "ThisWorkbook"
Private Sub workbook_Open()
Sheets("Work Packages").Unprotect Password:="Password"
Sheets("Work Packages").Protect Password:="Password", _
UserInterfaceOnly:=True
Sheets("Work Packages").EnableOutlining = True
Sheets("Work Units").Unprotect Password:="Password"
Sheets("Work Units").Protect Password:="Password", _
UserInterfaceOnly:=True
Sheets("Work Units").EnableOutlining = True
End Sub
The code I am using is below. Any help is appreicated.
I placed the code in the section labled "ThisWorkbook"
Private Sub workbook_Open()
Sheets("Work Packages").Unprotect Password:="Password"
Sheets("Work Packages").Protect Password:="Password", _
UserInterfaceOnly:=True
Sheets("Work Packages").EnableOutlining = True
Sheets("Work Units").Unprotect Password:="Password"
Sheets("Work Units").Protect Password:="Password", _
UserInterfaceOnly:=True
Sheets("Work Units").EnableOutlining = True
End Sub