- ©«¤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 ©ó 2014-8-28 05:06 ½s¿è
¦^´_ 7# ¤pµØ - Workbooks.Open Filename:=y.Range("L20") '¶}±Ò¸ê®Æ®w
½Æ»s¥N½X '§Aªº¸ê®Æ®w¬O¦bWorkbooks.Open¸Ì,ÁÙ¬O[OT Keyin.xlsm]!DataBasa- Private Sub Enter_Click()
- Dim Rng As Range, The_allTime As Single, AddTime As Single, Msg As Boolean
- If ComboBox1 <> "" And Year01 <> "" And Month01 <> "" Then
- With Sheets("DataBasa")
- Set Rng = .Range("a6").CurrentRegion '¸ê®Æ®w
- '*******************³]¸ê®Æ®w·Ç«h
- .Cells(1, .Columns.Count) = "¤é´Á±ø¥ó" '±ø¥ó¦¡·Ç«hÄæ¦ì¦WºÙ,¶·»P¸ê®Æ®wªºÄæ¦ì¦WºÙ¤£¬Û¦P
- .Cells(2, .Columns.Count) = "=AND(YEAR(¤é´Á)=" & Year01 & ",MONTH(¤é´Á)=" & Month01 & ")"
-
- .Cells(1, .Columns.Count - 1) = "©m¦W" ' "Á`¤u®É"
- .Cells(2, .Columns.Count - 1) = ComboBox1
-
- The_allTime = Application.DSum(Rng, "Á`¤u®É", .Cells(1, .Columns.Count - 1).Resize(2, 2))
- 'Application.DSum ¸ê®Æ®w¨ç¼Æ(H0 °Ñ¼Æ:=¸ê®Æ®w,°Ñ¼Æ:=Äæ¦ì,°Ñ¼Æ:=·Ç«h±ø¥ó) ¥[Á`
- If The_allTime > 30 Then
- Msg = True
- MsgBox ComboBox1 & " " & Year01 & "/" & Month01 & "¥[¯Z®É¼Æ " & The_allTime
-
- ElseIf ComboBox6 <> "" And ComboBox5 <> "" Then
- AddTime = (TimeValue(ComboBox6) - TimeValue(ComboBox5)) * 24 '·s¼W¥[¯Z®É¼Æ
- If The_allTime + AddTime > 30 Then '¥H¥[¯Z®É¼Æ+·s¼¨¯Z®É¼Æ
- Msg = True
- MsgBox ComboBox1 & " " & Year01 & "/" & Month01 & "¥[¯Z®É¼Æ " & The_allTime & " + " & AddTime
- End If
- End If
- End With
- End If
- If Msg Then Exit Sub '¦³¶W¹L30¤p®É,Â÷¶}µ{¦¡
- Set w = Sheets("DataBasa")
- Set Y = Sheets("Base")
- AAAA = ""
- '§AÄ~Äò¤U¥hªºµ{¦¡½X
½Æ»s¥N½X |
|