View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default Help with syntax

Recording an operation in a macro often helps! E.g. this statement was
produced in this way:

Range("A1:Q22").Sort Key1:=Range("A2"), Order1:=xlDescending, Header:= _
xlYes, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

Regards,
Stefi


€˛Joel€¯ ezt Ć*rta:

xlAscending or xlDescending

If you go to VBA window and right click. You can choose object browswer. I
went to the VBA help and found the parameter name XlSortOrder, but didn't
know what the values where. So I went to the object browser and did a search
for XlSortOrder and found the parameters to be xlAscending or xlDescending

Microsoft make thing very difficult to find.
"kirkm" wrote:


I'd like to add sortorder=descending to this line

Worksheets(strSheetName).Range(strColumnRange).Sor t _
Key1:=Worksheets(strSheetName).Range(strColumnRang e)

but can't figure out how to.

Anyone know?

Thanks - Kirk