Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On a different computer than my own, I created two sort routines via RECORD
MACRO. I then created a Command Button, copied & pasted the sort routine to its appropriate command button. On the other computer, these routines worked fine. However, when I loaded the Excel file onto my computer the routines do not work. I have other command buttons that continue to work properly on both computers. I use MS Office 2000 Premium. I have not checked the version I used on the other computer. However, since I used the "record" feature, I figured it would be the same. Here are both routines. The area that gets highlighted when I click on debug is the section that begins with "Selection.Sort" and ends with ":=xlSortNormal" Private Sub CommandButton15_Click() Range("A6:M48").Select Selection.Sort Key1:=Range("C6"), Order1:=xlAscending, Key2:=Range("A6") _ , Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _ False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2 _ :=xlSortNormal Range("A6").Select End Sub Private Sub CommandButton16_Click() Range("A6:M48").Select Selection.Sort Key1:=Range("A6"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal ActiveWindow.SmallScroll Down:=-18 Range("A13:M48").Select Selection.Sort Key1:=Range("C13"), Order1:=xlAscending, Key2:=Range("A13" _ ), Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _ False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2 _ :=xlSortNormal Range("A6").Select End Sub Any help is appreciated, Les |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sort not working | Excel Worksheet Functions | |||
Sort formula not working | Excel Discussion (Misc queries) | |||
Data Sort NOT working... | Excel Discussion (Misc queries) | |||
Sort not working | Excel Programming | |||
Sort Left to Right not working | Excel Discussion (Misc queries) |