ORDER dictionary element ORDER dictionary element sal21 (Programmer) (OP) 17 Nov 20 16:40 I fiil this dictionary with; 'COMBO_DATA If Not MYDIC1.Exists(DATA) Then MYDIC1.Add DATA, RW + 1 End If how to order this array? Note: DATA is date RE: ORDER dictionary element strongm (MIS) 18 Nov 20 12:06 VB doesn't include a dictionary class, so I presume you are using the vbscript dictionary. If so, afraid it does not have a sort method, so you,ll have to write yourself a sort function. But dictionaries are specifically designed as random access, so if you need sorting, then perhaps it is the wrong class to use. What are you trying to achieve? [Post Deleted] RE: ORDER dictionary element sal21 (Programmer) (OP) 18 Nov 20 17:34 I read a txt line by line, and get DATA from a Mid, position from each line, to the and of loop, i need to fill a combobox with a ordered DATA. The string DATA not is ordered during the loop in txt... Similar: 11/09/2010 14/12/1989 15/12/2011 ... ecc. RE: ORDER dictionary element Andrzejek (Programmer) 18 Nov 20 18:40 in VB6, Combo box has Sorted property, but in the tip it says: "Indicates whether the elements of a control are automatically sorted alphabetically". Since it looks like you have Dates to display, that may not work for you But you can always sort your data by yourself... ---- Andy There is a great need for a sarcasm font. RE: ORDER dictionary element strongm (MIS) 18 Nov 20 23:21 So you don't actually need a dictionary? That's what I am trying to get at. You just want an array that you can sort? Or is there info missing from your description? I ask because of it you are just using the ductiobary as a simple array, then you could instead use VB.nets ArrayList with a custom sort comparison function. And yes, you can use various .net bits and pieces in VB. I've illustrated the idea mentioned above previously in a thread222-1695412: ListBox sort not as expected; look for my post of 15 Oct 12 19:17 RE: ORDER dictionary element strongm (MIS) 19 Nov 20 17:37 >Since it looks like you have Dates to display, that may not work for you Unless of course the OP is adhering to ISO 8601 ... RE: ORDER dictionary element Andrzejek (Programmer) 19 Nov 20 17:52 Oh, the Date format… Looks like I was years ahead of time while attending high school (a long time ago and far, far away from USA) where – back then - in my notes I did write in the format of 2020-11-19 You know, you could use a Bubble Sort for your dates, or… you can cheat. Let the (other) combo box do the sorting for you. Have another combo box with the Sort property set to True, populate it with the dates from your text file in the YYYY-MM-DD format, which will put them in the order you want. Then you can use this extra combo box to populate your original combo with the dates in any format you want. ---- Andy There is a great need for a sarcasm font.