- ©«¤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
|
¦^´_ 12# lifedidi
1¦³¿ìªk·Ó¶¶§Ç- Private Sub UserForm_Initialize() 'ªí³æªì©l¤Æªºµ{§Ç
- Dim D As Object
- Set D = CreateObject("Scripting.Dictionary") '¦r¨åª«¥ó
- With Sheet1
- For Each a In .Range(.[D7], .[D7].End(xlDown))
- D(a.Value) = ""
- Next
- End With
- ComboBox1.List = D.keys '±M®×¿ï¶µ¤º®e
- End Sub
- Private Sub ComboBox1_Change() '±M®×¿ï¶µ¤º®e: ¦³§ïÅÜ
- If ComboBox1.ListIndex > -1 Then
- ComboBox2¸ê®Æ
- Else '§ïÅܪº¤º®e¤£¦bList¤¤
- ComboBox2.Clear
- End If
- End Sub
- Private Sub ComboBox2¸ê®Æ()
- Dim D As Object
- Set D = CreateObject("Scripting.Dictionary")
- With Sheet1
- For Each a In .Range(.[D7], .[D7].End(xlDown))
- If a.Value = ComboBox1 Then D(a.Offset(, 3).Value) = "" '
- Next
- With .Columns(.Columns.Count).EntireColumn 'Sheet1ªº³Ì«á¤@Äæ
- .Clear
- .Cells(1).Resize(D.Count, 1) = Application.WorksheetFunction.Transpose(D.keys)
- '*** ±Æ§Ç
- .Cells(1).Resize(D.Count, 1).Sort Key1:=.Cells(1), Order1:=xlAscending, Header:= _
- xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
- SortMethod:=xlStroke, DataOption1:=xlSortNormal
- '*******
- ComboBox2.List = .Cells(1).Resize(D.Count, 1).Value '¤uºØ¿ï¶µ¤º®e
- ComboBox2.Value = ComboBox2.List(0) '¤uºØ¿ï¶µªºÈ
- .Clear
- End With
- End With
- End Sub
½Æ»s¥N½X 2¹q¸£¤£¦Y¤O- Public Sub ²M°£()
- With Sheet2
- '.Cells(7, 3).Resize(999 - 7 + 1, 25 - 3 + 1) = ""
- .Cells(7, 3).Resize(993, 23) = ""
- 'For i = 7 To 999
- ' For j = 3 To 25
- ' Cells(i, j) = ""
- ' Next
- ' Next
- End With
- End Sub
½Æ»s¥N½X |
|