Thread: sort a column
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Withnails Withnails is offline
external usenet poster
 
Posts: 16
Default sort a column

hello
i am looking to sort a data table by column I. the amount of rows in column
I will change over time. when i record this macro it send up an error
(application or object is not defined).
this all happens on sheet two of the worksheet in question.
Can you help and let me know why this error is happening, i'm at a loss?!
thank you - philip

PS: code i have been using is...
Sheets("Sheet2").Select
Cells.Select
Range("A1").Activate
Selection.Sort Key1:=Range("I2"), Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal