Home |
Search |
Today's Posts |
#1
|
|||
|
|||
sorting with macros
I created a employee schedule and i dont want people adding rows and such to
i locked all cell except for the names of the employees which are list under column A. I set up a macros so that all the user has to do is add new employees at the next availible row and delete any employees that have left. Then press a macros button and the names list in column A sort in ABC order. The problem is that when i set the macros it sorts correctly, and then i push the macros button that i assigned it to and it does nothing. The strange thing is that it works on other worksheet in the same workbook. here is the code for the unworking macros. Sub sortconc() ' ' sortconc Macro ' Macro recorded 1/31/2005 by palace ' ' Range("A7:A80").Select Selection.Sort Key1:=Range("A8"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Range("A7").Select End Sub and here is the code that works for another sheet Sub sortbox() ' ' sortbox Macro ' Macro recorded 5/5/2004 by Muvico Employee ' ' Range("A7:A36").Select Selection.Sort Key1:=Range("A7"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Range("A7").Select End Sub any help would be great. scott |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Books on writing Macros | Excel Discussion (Misc queries) | |||
Transferring toolbars and macros to other computers | Excel Discussion (Misc queries) | |||
The available macros list in XL; how to suppress filename from showing | Excel Discussion (Misc queries) | |||
Macros disappear after a file is imported | Excel Discussion (Misc queries) | |||
sorting question | Excel Discussion (Misc queries) |