Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jun 2001
    Location
    Amsterdam, the Netherlands
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sorting a listbox in VBA (Word 2000)

    I know it was probably asked a thousand times before, but I can't find it anywhere... How does one sort a listbox in Word 2000 VBA? In Visual Basic the listbox control has a Sorted property which when True sorts your listbox.
    How do I do this in Word? Do I have to sort the data first before putting it in the listbox? Or is there a way I can sort the data already in the listbox?

    TIA,

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Sorting a listbox in VBA (Word 2000)

    The common methods are to put your data in an array and sort that using WordBasic.SortArray, or to sort the items directly in the control using a custom function. If you go back to the posts from 2001, I think you will find a couple of different ways to sort the listbox without using the WordBasic.SortArray method.

  3. #3
    New Lounger
    Join Date
    Jun 2001
    Location
    Amsterdam, the Netherlands
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sorting a listbox in VBA (Word 2000)

    Thanks, apparently I limited my search too severly. I've found the posts you were revering to.

Posting Permissions

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