TheSwamp

Code Red => VB(A) => Topic started by: Tyke on March 02, 2010, 06:49:28 AM

Title: Ordering entries in a combo box
Post by: Tyke on March 02, 2010, 06:49:28 AM
I have a combobox that I've populated with the names of all the layers in the drawing. In the dropdown list the layers are not ordered.

Is there a way to order the layer names alphabetically?

Thanks
Title: Re: Ordering entries in a combo box
Post by: Atook on March 02, 2010, 01:15:11 PM
I don't think so. In the past I've sorted the list before populating the combobox.
Title: Re: Ordering entries in a combo box
Post by: Matt__W on March 02, 2010, 01:35:49 PM
http://users.skynet.be/am044448/Programmeren/VBA/vba_sort_listbox.htm
Title: Re: Ordering entries in a combo box
Post by: Tyke on March 03, 2010, 07:06:23 AM
Thanks Matt,

The link was the answer. The sort had to be modified a little but it now sorts all the layer names in alphabetical order.

If anybody is interested I can post the final version.
Title: Re: Ordering entries in a combo box
Post by: Matt__W on March 03, 2010, 08:25:50 AM
You're welcome.