0

Hi Everyone,

can someone help me on this, i cant figure out how to 'correctly sort' an already 'sorted' listbox in VB6, with alphanumeric items

  • listbox when the Sort property set to TRUE have these values


data0
data1
data10
data19
data2
data22
data3
data31

  • i need to have a function that will SORT it correctly something like this


data0
data1
data2
data3
data10
data19
data22
data31

  • total listcount maybe around 5000 lines, and "data" is not constant


data0
data10
data2
dq0
dq10
dq2

  • i already tried searching the net for a solution but only available mostly on integers
  • and because ALL listbox used in my project was sorted by setting the SORT property to TRUE, i need to have at least input of the function with listbox sort property to TRUE

thanks
ariesL

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by ariesL
0

Hi,

You need to Split the Text into 2 Parts, and then Sort it..
Numeric Part should be formatted with Appropriate Zeros in Between..
Data need to be like this:...

Data001
Data002
Data003
Data010
Data012
Data100

If you know how many distinct TextParts you have, Then
Loop thru the ListBox, And Format the Text Properly, and add to another list box..

Regards
Veena

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.