Results 1 to 4 of 4

Thread: Listbox code error.

  1. #1

    Thread Starter
    Addicted Member Garrett19212's Avatar
    Join Date
    Jan 2005
    Location
    US
    Posts
    220

    Listbox code error.

    This code gives me a error.
    Can't assign to read only property.
    VB Code:
    1. List1.Sorted = False

  2. #2
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: Listbox code error.

    Because list1.sorted isnt a property you can change

  3. #3
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Listbox code error.

    Set it before you run your program. You can also have a duplicate list of items that aren't sorted. When you want to show the sorted one, hide the other.

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Listbox code error.

    You can also sort the list before adding it to the listbox. If you are adding to you listbox from an SQL query, adding an ORDER BY clause will suit the purpose nicely.

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