Sorting Combobox
Sorting Combobox
(OP)
Hi everyone,
I need to sort the content of a combobox alphbetically but the problem is that string starts with a numeric value, example -
10002489 Tempo
10001075 Cosmos
10001158 Lining
Hope someone can please help,
Thank you.
I need to sort the content of a combobox alphbetically but the problem is that string starts with a numeric value, example -
10002489 Tempo
10001075 Cosmos
10001158 Lining
Hope someone can please help,
Thank you.
RE: Sorting Combobox
Instead of comparing the whole strings compare only their relevant parts.
If all numeric prefixes are 8 character long as in the example, Copy(str,10,Length(str)) is enough. Otherwise just take the part after the first space : Copy(str,Pos(' ',str)+1,Length(str)) .
Feherke.