I am looking to achieve the following 3 actions on a workbook (see attached) I am designing:
1) Sort on the data table on the sheets (Range A2:CM87). The range may change if new rows are added or deleted so if can be done dynamically, that would be ideal. I would love to accomplish the sorting by the following method I found from another site
[INDENT]Method that allows to sort easily by clicking on the header.
You could assign a macro to hidden rectangles in the header rows. The macro
would unprotect the sheet, sort by that column and reprotect the sheet.
Sample code and file found at Debra Dalgleish's site:
[/INDENT]I attempted to use this in my file and received errors. It seems pretty straightforward so I'm not sure why I am getting errors but I am a novice at VB. I would like to have all 91 columns to have the sorting capability.
2) Allow Filtering on the data table
3) Allow users to Expand/Collapse Groupings on the Sheets
I have some Workbook_Open code in the file which allows Outlining but doesn't allow Filtering, Sorting, etc. after the workbook is opened up.
Private Sub Workbook_Open() With Sheet1 .Protect Password:="", UserInterfaceOnly:=True .EnableOutlining = True End With With Sheet2 .Protect Password:="", UserInterfaceOnly:=True .EnableOutlining = True End With End Sub
I attached the sample workbook that I am working with. It's password protected but I didn't use a specific password = "". Any help will be greatly appreciated. I looked for hours trying to find answers for all of these and I can't seem to get it all working.