Home |
Search |
Today's Posts |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I finally got it to work. Here is some code to help anyone who may need it.
This will allow you to sort the entire sheet ascending by column A. It will sort 4000 rows and through column L starting at row 3. My sheet is protected, but I needed to allow the users to use the auto filter feature. Thanks for everyone's help with this. Sub ProtectionOptions() If ActiveSheet.Protection.AllowFiltering = False Then ActiveSheet.Protect AllowFiltering:=True End If End Sub Private Sub CommandButton1_Click() ActiveSheet.Unprotect Range("a3").Activate Range("a3:L4000").Sort Key1:=Range("a3:l4000") CommandButton1.Activate ActiveSheet.EnableAutoFilter = True ActiveSheet.Protect contents:=True, userInterfaceOnly:=True End Sub "N. McCain" wrote: I need a command button to sort the entire sheet by column "A" in ascending order. My button is only sorting column "A" and nothing else. Can someone please help me? Thanks in advance |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Updating workbook with an alpha sort sheet and a numeric sort shee | Excel Discussion (Misc queries) | |||
sort function for dates does not sort properly in Office 2007 Exc. | Excel Worksheet Functions | |||
Pls. reply Sort Data and copy to next coulmn when sort order chang | Excel Programming | |||
Excel sort by Fill Color by custom list sort | Excel Discussion (Misc queries) | |||
sort (on part of) string - originally posted under Tricky Sort | Excel Programming |