Sort Names!!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • parkho
    New Member
    • Feb 2008
    • 6

    Sort Names!!

    Hi, I have the following code to Sort entries

    for i = 1 to 4

    for j=1 to 4

    if getname( i ) > getname( j+1 ) then

    sort = getname( j+1 )

    getname( j+1 ) = getname( i )

    getname( i ) = sort

    end if

    next j

    next i

    please help find out why it's not working!

    thanks
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    Which entries ?
    What are you sorting ?

    Comment

    • Killer42
      Recognized Expert Expert
      • Oct 2006
      • 8429

      #3
      Try running the inner (j) loop backwards, from 4 to 1. Or similar (maybe 4 to 0, or 5 to 1 I'm not sure).

      Comment

      Working...