- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
        
|
¦^´_ 1# av8d - Option Explicit '«Å§iÅܼƪº²ßºDn¾i¦¨
- Dim d As Object
- '°O±oDim d As Object ³on¸m©ó¼Ò²Õªº³»ºÝ§@¬°³o¼Ò²Õªº¨p¥ÎÅܼÆ
- 'ComboBox2.List = Split(d(Val(ComboBox1.Value)), ",") ¤~·|¦³µª®×
- Private Sub UserForm_Initialize()
- Dim A, AMonth As String
- Set d = CreateObject("Scripting.Dictionary")
- With ActiveSheet
- For Each A In .Range("a2", .[a2].End(xlDown))
- If d(Year(A.Value)) = "" Then
- d(Year(A.Value)) = Month(A.Value)
- Else
- AMonth = "," & d(Year(A.Value)) & "," '¦r¨åª«¥óªºitem «e«á¥[¤W ,
- If InStr(AMonth, "," & Month(A.Value) & ",") = 0 Then '¦r¨åª«¥óªºitem ¤¤¤ñ¹ï¤ë¥÷µL«´_
- d(Year(A.Value)) = d(Year(A.Value)) & "," & Month(A.Value) '¦r¨åª«¥óªºitem ¦A¥[¤W , ¤Î¤ë¥÷
- End If
- End If
- Next A
- ComboBox1.List = d.keys
- End With
- End Sub
- Private Sub ComboBox1_Change()
- If ComboBox1.ListIndex > -1 Then
- TextBox9 = ComboBox1.Value
- ComboBox2.List = Split(d(Val(ComboBox1.Value)), ",")
- '¦r¨åª«¥óªºitem ¥ÎSplit¥H","Âà´«¦¨°}¦C
- End If
- End Sub
½Æ»s¥N½X |
|