Still can't work with "Sort Method"

Alvaro

New Member
This is the code for Excel 2000:

&SCOPED-DEFINE xlGues 0
&SCOPED-DEFINE xlAscending 1
&SCOPED-DEFINE xlSortValues 0
&SCOPED-DEFINE xlAscending 1
&SCOPED-DEFINE xlSortRows 2
&SCOPED-DEFINE xlPinYin 1

chWorksheet:Range("3:300"):Sort(
chWorksheet:Range("G3"), /* Key1 */
{&xlAscending}, /* Order1 */
chWorksheet:Range("B3"), /* Key2 */
{&xlSortValues}, /* Type */
{&xlAscending}, /* Order2 */
chWorksheet:Range("A3"), /* Key3 */
{&xlAscending}, /* Order3 */
{&xlGuess}, /* Header*/
1, /* OrderCustom */
false, /* MatchCase */
{&xlSortRows}, /* Orientation */
{&xlPinYin} /* SortMethod */
).

With this code i get next error = "error while accessing property/method sort. The reference in not valid. Error code: 0x80020009"

could anyone help me please?

Regards,

Alvaro
 
Top