Right click on the sheet tabview codeinsert thissave workbook.
name your range to be sorted as sortrange
Double click on any column to sort by that column.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range, Cancel
As Boolean)
[sortrange].Sort Key1:=Cells(1, activecell.column), Order1:=xlAscending,
Orientation:=xlTopToBottom
SendKeys "^{home}"
End Sub
"ticketopia" wrote in message
...
Help!!! I need a macro that will sort data by a column when the user
clicks on the column heading (i.e., username).
The macro then needs to return the user to the cell that was selected
prior to sorting the data.
Oh yeah, and I need it within a 1/2 hour.......
Puhleeeeeeaase help me!!!!!
Thanks so much!!
------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/