Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 156
Default Help with syntax


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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Help with syntax

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
right syntax pls123 Excel Worksheet Functions 8 May 6th 10 05:18 AM
Syntax HELP Eric H Excel Discussion (Misc queries) 4 August 30th 08 01:30 AM
Syntax help for if Dean[_8_] Excel Programming 2 November 1st 06 07:43 PM
Syntax help please GettingThere Excel Programming 3 August 19th 05 01:25 AM
Help with VBA syntax jacqui[_2_] Excel Programming 3 January 13th 04 02:29 PM


All times are GMT +1. The time now is 12:22 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"