Results 1 to 3 of 3

ERROR WHILE RUNNING MACRO

This is a discussion on ERROR WHILE RUNNING MACRO within the Excel Questions forums, part of the Question Forums category; I was trying to rum this macro which selects a range then gives it a name and then comes back ...

  1. #1
    Board Regular
    Join Date
    Jul 2002
    Posts
    223

    Default

    I was trying to rum this macro which selects a range then gives it a name and then comes back and tries to sort it by two headers. The code is as follows:

    {EDIT-GOTO RPTSET}
    {SELECT-DOWN (SETCNT)}{SELECT-RIGHT 9}
    {RANGE-NAME-CREATE "RPTSORT"}{ESC}
    {EDIT-GOTO DAYS01}{SELECT-DOWN (SETCNT)}
    {RANGE-NAME-CREATE "DATES"}{ESC}
    {EDIT-GOTO DTHSORT1}{SELECT-DOWN (SETCNT)}
    {RANGE-NAME-CREATE "DEATH"}{ESC}
    {EDIT-GOTO DTHSORT2}{SELECT-DOWN (SETCNT)}
    {RANGE-NAME-CREATE "REPORTED"}{ESC}
    {SORT RPTSORT;REPORTED;"ascend";DATES;"descend"}
    {ESC}

    but when i run this it gives me this error:
    INVALID SORT HEADER DEPTH{SORT}

    iT WORKED FINE BEFORE....ANY IDEAS ON WHAT I CAN DO TO MAKE IT WORK??

    tHANK U
    NAVYA.

  2. #2
    New Member
    Join Date
    Jun 2002
    Location
    Sussex
    Posts
    34

    Default

    Hi navyaa

    I have always had problems with lotus sorting. usually it works once then gives error messages every time you run it. I used to get over this by including a line to reset all the defined sort keys, then re define them with your code.

    hope this helps

  3. #3
    Board Regular
    Join Date
    Jul 2002
    Posts
    223

    Default

    Thank you for your help....works just fine now

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com