LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 470
Default SORT not working

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sort not working stevemalee[_2_] Excel Worksheet Functions 3 March 9th 09 11:49 PM
Sort formula not working Pat Excel Discussion (Misc queries) 0 July 28th 07 07:44 PM
Data Sort NOT working... Bob Barnes Excel Discussion (Misc queries) 1 June 20th 06 11:00 PM
Sort not working STEVEB Excel Programming 0 February 7th 06 06:12 PM
Sort Left to Right not working Juan Excel Discussion (Misc queries) 3 July 29th 05 07:26 PM


All times are GMT +1. The time now is 08:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"