PC Review


Reply
Thread Tools Rate Thread

Can you Sort Listbox Values Alphabetically by code?

 
 
Corey
Guest
Posts: n/a
 
      19th Feb 2007


 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWFydGluIEZpc2hsb2Nr?=
Guest
Posts: n/a
 
      19th Feb 2007
Corey:

You can't automatically get them sorted in a list box but you can add items
at specific places.

So the easiest way to do it is to sort the items in an array prior to
putting them on the listbox.

And you can add the array at once.

Note for bound items this cannot be done. (sort the bound list.)
--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Corey" wrote:

>
>
>

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      19th Feb 2007
John Walkenbach shows how:
http://j-walk.com/ss/excel/tips/tip47.htm

Corey wrote:

--

Dave Peterson
 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      19th Feb 2007
Martin has given good advice in emphasizing that items don't have to be
isnerted at the end of the list. Here is some addtional information:

This article by John Walkenbach shows how to fill a listbox (or combobox)
with a unique list of sorted items. You can use the whole approach or
extract what you need and adapt it to your situation.

http://www.j-walk.com/ss/excel/tips/tip47.htm

--
Regards,
Tom Ogilvy


"Corey" wrote:

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combo Box - Now populated with unique values but how to best sort them alphabetically ?? Rob W Microsoft Excel Discussion 2 28th Nov 2007 12:40 AM
sort alphabetically =?Utf-8?B?Sm9obkx1dGU=?= Microsoft Access 2 3rd Mar 2006 01:50 PM
Fill and sort multicol listbox from VBA code? Jens Meier Microsoft Excel Programming 5 2nd Mar 2006 06:10 PM
Re: how to sort alphabetically Frank Kabel Microsoft Excel New Users 0 25th Mar 2004 05:54 PM
sort alphabetically michaela Windows XP Internet Explorer 1 3rd Feb 2004 02:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:32 AM.