How to sort in ascending order in a comboBox
Solved
Flow
-
Flow -
Flow -
Hello everyone,
I created a program that gives me the coordinates of each client based on the number of days until the next maintenance, and I have a question because I can't sort my numbers in the comboBox in ascending order.
Could you please help me?
Thank you,
I created a program that gives me the coordinates of each client based on the number of days until the next maintenance, and I have a question because I can't sort my numbers in the comboBox in ascending order.
Could you please help me?
Thank you,
1 answer
-
Hello,
see this:
https://excel.developpez.com/faq/?page=OleObject#TriAlphaComboBox
Sub SortAlpha_ComboBox() Dim i As Integer, j As Integer Dim strTemp As String 'Clear the ComboBox content ComboBox1.Clear 'Fill the ComboBox ComboBox1.List() = Array("5", "2", "4", "3", "1") 'Sort the ComboBox content in alphabetical order With ComboBox1 For i = 0 To .ListCount - 1 For j = 0 To .ListCount - 1 If .List(i) < .List(j) Then strTemp = .List(i) .List(i) = .List(j) .List(j) = strTemp End If Next j Next i End With End Sub
--
@+ The Woodpecker-
-
-
I have executed the code below, it corresponds to my TextBox6:
Private Sub TextBox6_Change()
TextBox6.Text = WorksheetFunction.Proper(Format(TextBox6.Text, "dddd d mmm yyyy"))
End Sub
However, the date is incorrect, maintenance is supposed to be performed in 19 days, and it displays Friday, June 3, 2016, as if a base offset is being taken into account.
Do you have any idea where this might be coming from?
Thank you again; -
-
-