以下是我用字典的一段程式
arr1 = Array(UserForm5.ComboBox1)
Set dic1 = CreateObject("scripting.dictionary")
For I = 1 To UBound(arr1)
dic1(arr1(I)) = ""
Next
arr1 = UserForm5.ComboBox1.List
For I = 1 To UBound(arr1)
dic1(arr1(I, 0)) = ""
'arr1(I) = Application.Small(UBound(arr1), I)
Next
UserForm5.ComboBox1.List = dic1.keys
但是我想要排序,請問要怎麼寫??作者: 准提部林 時間: 2015-12-28 09:56
做再次處理,繞圈子是必要,若是〔純數值〕,可利用函數:
ReDim Brr(1 To Dic1.Count)
For i = 1 To Dic1.Count
Brr(i) = Application.Small(Dic1.keys, i)
Next i
UserForm5.ComboBox1.List = Brr