View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] halimnurikhwan@yahoo.com is offline
external usenet poster
 
Posts: 113
Default 1 click sorting *almost there*

Hi,

Maybe this site will help you:
www.oaltd.co.uk

and try to download quckshort.zip ,
there's algorithm sample using API

Rgds,

HAlim

m3s3lf menuliskan:
I've got some invisible rectanges that sit on top of my headers, so when
somebody clicks on them, they sort based on that column. (All I did was
assign some simple macros to each rectangle.) Anyhow, I would really
like to be able to sort ascending with 1 click and descending with
another click. Does anybody have any ideas on how to accomplish this?

Here's one of my sort macros:

Code:
--------------------
Sub ArchiveSortBySalePrice()
Range("ClosedSales").Sort Key1:=Range("D2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub