- ©«¤l
- 703
- ¥DÃD
- 276
- ºëµØ
- 0
- ¿n¤À
- 1005
- ÂI¦W
- 1
- §@·~¨t²Î
- Windows 10
- ³nÅ骩¥»
- Office 2019
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-6-30
- ³Ì«áµn¿ý
- 2024-5-29
|
¥»©«³Ì«á¥Ñ av8d ©ó 2012-7-11 16:27 ½s¿è
¦^´_ 2# GBKEE
½Ð°Ý¤j¤j~
¦pªG§Ú·s¼W¤F¤@ÓComboBox3¡A¬°¤FÅã¥ÜDÄæ¡A¸Ó¦p¦ó´¡¤J?
쥻¨S¦³ComboBox1¡AComboBox2ªº®ÉÔ¬O³o¼Ë¤l
Private Sub UserForm_Initialize()
Dim d As Object, A
Set d = CreateObject("Scripting.Dictionary")
With ActiveSheet
For Each A In .Range("d2", .[d2].End(xlDown))
d(A.Value) = ""
Next A
ComboBox3.List = Application.Transpose(d.keys)
End With
End Sub
¦pªG·s¼W¤@ÓComboBox3©MComboBox4°µ·f°t¡A¸Ó¦p¦ó´¡¤J?
쥻¨S¦³ComboBox1¡AComboBox2ªº®ÉÔ¬O³o¼Ë¤l
Dim d As Object
Private Sub UserForm_Initialize()
Dim A As Range, W As String
Set d = CreateObject("Scripting.Dictionary")
With ActiveSheet
For Each A In .Range("d2", .[d2].End(xlDown))
If d(A.Value) = "" Then
d(A.Value) = A.Offset(, 1).Value
Else
W = "," & d(A.Value) & "," '¦r¨åª«¥ó¤º®e«e«á¥[¤W ,
If InStr(W, "," & A.Offset(, 1) & ",") = 0 Then d(A.Value) = d(A.Value) & "," & A.Offset(, 1)
'InStr(w, "," & A.Offset(, 1) & ",") = 0 ¤ñ¹ï¦r¨åª«¥ó¤º®e¦³µLA.Offset(, 1)ªº¦r¦ê
End If
Next
ComboBox3.List = d.KEYS
End With
End Sub |
|