Results 1 to 8 of 8

Thread: Help sorting listbox in Ascending order(listbox holds only numbers)

Threaded View

  1. #5
    Frenzied Member
    Join Date
    Mar 2008
    Posts
    1,210

    Re: Help sorting listbox in Ascending order(listbox holds only numbers)

    Try;
    List1.AddItem Right$("0000" & strItem,5)
    or
    List1.AddItem Right$(Space$(4) & strItem,5)

    Correction that should have been
    Try;
    List1.AddItem Right$("0000" & strItem,4)
    or
    List1.AddItem Right$(Space$(4) & strItem,4)
    to handle numbers up to 4 characters long.
    To handle longer numbers use eg. Right$(Space$(5) & strItem,5) etc...
    Last edited by Magic Ink; Oct 28th, 2012 at 11:43 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width