View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_3_] Bob Phillips[_3_] is offline
external usenet poster
 
Posts: 2,420
Default Sort selected range

See if this is better

Set rng = Range("D65534").End(xlUp)
Set rng = Range(rng, rng.End(xlToRight))
rng.Sort Key1:=rng.Cells(1, 1), _
Order1:=xlAscending, _
Header:=xlGuess, _
OrderCustom:=1, _
MatchCase:=False, _
Orientation:=xlLeftToRight, _
DataOption1:=xlSortNormal



--
__________________________________
HTH

Bob

"J.W. Aldridge" wrote in message
...
getting error on this portion....

rng.Sort Key1:=rng.Cells(1, 1), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlLeftToRight,
_
DataOption1:=xlSortNormal


"application defined or object defined error"