- ©«¤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
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2013-4-30 17:11 ½s¿è
¦^´_ 1# lifedidi
¸Õ¸Õ¬Ý- Private Sub UserForm_Initialize() '°ò¥»³]©w
- ' Set «¬¸¹ = CreateObject("Scripting.Dictionary") '¯Ó®É:¶·¶]§¹©Ò¦³¸ê®Æ¦C
- Dim X As Integer
- ' Sheets("¿z¿ï¥Î").[A2:A2].ClearContents
- With Sheets("SHEET1")
- 'er = .[A65536].End(3).Row
- 'myrng = .Range("A7:R" & er) '¸ê®Æ¼Æ¨Ó¨ì10000µ§¥H¤W®É ***³o·|¦û¥Î°O¾ÐÅé***
- .Cells(1, .Columns.Count) = ""
- .Range("D6", .[D6].End(xlDown)).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=.Cells(1, .Columns.Count), Unique:=True
- '¶i¶¥¿z¿ï DÄæ ¤£«½Æ¸ê®Æ Unique:=True ¨ì³Ì«á¤@Äæ
- X = 2
- Do While .Cells(X, .Columns.Count) <> ""
- ComboBox1.AddItem .Cells(X, .Columns.Count)
- X = X + 1
- Loop
- .Columns(.Columns.Count).EntireColumn.Clear '²M°£ ³Ì«á¤@Äæ¸ê®Æ
- End With
- End Sub
- Private Sub ComboBox1_Change() '¿ï¾Ü ¤U©Ô¦¡¿ï³æ1 ¥ß§YÅã¥ÜÁ`Á`®É¶¡;¥i¤£¥Î¬d¸ß¶s
- If ComboBox1.ListIndex = -1 Then '¤£¦b¤U©Ô¦¡¿ï³æªº²M³æ¤º
- MsgBox "±M®×½s¸¹ ½s¸¹ " & ComboBox1 & " ¤£¥¿½T"
- Else
- Application.ScreenUpdating = False
- With Sheets("SHEET1")
- .Range("a6").AutoFilter Field:=4, Criteria1:=ComboBox1 'AutoFilter: ì¸ê®Æ®w¤W¦Û°Ê¿z¿ï.
- With .Range("r:r").SpecialCells(xlCellTypeVisible)
- TextBox1.Value = Application.Text(Application.Sum(.Cells), "[hh]:mm")
- End With
- .AutoFilterMode = False
- End With
- Application.ScreenUpdating = True
- End If
- End Sub
- Private Sub CommandButton3_Click() 'Â÷¶}¶s
- Unload UserForm1
- End Sub
- Private Sub UserForm_Terminate() '«·s±Æ¦C
- 'Sheets("SHEET1").Range("A7:R" & er) = myrng '«·s¶ñ¤W¸ê®Æ¯Ó®É
- End Sub
½Æ»s¥N½X |
|