H
Howard
Hi,
I am using ExcelXP with service pack3 and I have a
sorting code that works like so when selecting a value
from a combo box. It works on my computer, but when
someone in a prior version of Excel tries to use it, they
get a run-time 1004 error. However, if I recreate the
code in their computer, verbatim, it works on their
computer. The run-time error breaks down starting
at "Selection.Sort". Does anyone know if this is some
kind compatibility issue or is there a way to better code
this?
Thanks - Howard
SortByTeaching:
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Sort Key1:=Range("B10"),
Order1:=xlDescending, Key2:=Range( _
"A10"), Order2:=xlAscending, Header:=xlGuess,
OrderCustom:=1, MatchCase _
:=False, Orientation:=xlTopToBottom,
DataOption1:=xlSortNormal, _
DataOption2:=xlSortNormal
GoTo CleanUp
Run time error '1004'
Application-defined or object-defined error
I am using ExcelXP with service pack3 and I have a
sorting code that works like so when selecting a value
from a combo box. It works on my computer, but when
someone in a prior version of Excel tries to use it, they
get a run-time 1004 error. However, if I recreate the
code in their computer, verbatim, it works on their
computer. The run-time error breaks down starting
at "Selection.Sort". Does anyone know if this is some
kind compatibility issue or is there a way to better code
this?
Thanks - Howard
SortByTeaching:
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Sort Key1:=Range("B10"),
Order1:=xlDescending, Key2:=Range( _
"A10"), Order2:=xlAscending, Header:=xlGuess,
OrderCustom:=1, MatchCase _
:=False, Orientation:=xlTopToBottom,
DataOption1:=xlSortNormal, _
DataOption2:=xlSortNormal
GoTo CleanUp
Run time error '1004'
Application-defined or object-defined error