Set d = CreateObject("Scripting.Dictionary")
Set Rng = Range("A1:A20")
For Each a In Rng
d(a.Value) = ""
Next
MsgBox d.Count '項目數量
ComboBox1.List = d.keys '寫入清單作者: yangjie 時間: 2012-9-12 00:06
回復 2#Hsieh
太棒了
請教H大大
問題1. d(a & "")=array(a.offset(,1)) 與 d(a.value)="" 把我搞混了 尤其是 那兩個 ""
問題2. Set d = CreateObject("Scripting.Dictionary")
With Sheets("存查")
For Each a In .Range(.Cells(2, 2), .Cells(65536, 2).End(xlUp))
d(a.Value) = ""
Next
End With
If d.Count = 0 Then Exit Sub
ComboBox1.List = d.keys
若要加一的條件 於column(an1)有="string1" 之 下作相異篩選 d(a.Value) 那條件column(an1)有="string1"應加在哪兒?作者: Hsieh 時間: 2012-9-12 10:36