Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Shawn,
As suggested By Dave in his adjacent post, delete the contentious parameter: Selection.Sort Key1:=Range("G7"), _ Order1:=xlDescending, _ Header:=xlGuess, _ OrderCustom:=1, _ MatchCase:=False, _ Orientation:=xlTopToBottom --- Regards, Norman "Shawn" wrote in message ... How should I write that code? There error is: "Compile error, variable not defined" -- Thanks Shawn "Norman Jones" wrote: Hi Shawn, If your user has abn earlier version (xl2k?) then: DataOption1:=xlSortNormal would cause a problem as this argument would not be recognised. When writing an application, it is important to develop using oldest version of Excel likely to be encountered. --- Regards, Norman "Shawn" wrote in message ... Here is my code: Range("A6", Range("G65536").End(xlUp)).Select Selection.Sort Key1:=Range("G7"), Order1:=xlDescending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Range("A6").Select It works fine on my machine. However, when I e-mail this file to other users, they get an error and the Selection code is highlighted??? -- Thanks Shawn |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sort Issue | Excel Discussion (Misc queries) | |||
SORT/FILTER ISSUE | Excel Worksheet Functions | |||
Lookup and sort issue | New Users to Excel | |||
Sort issue | Excel Worksheet Functions | |||
Sort issue | Excel Programming |