- ©«¤l
- 85
- ¥DÃD
- 26
- ºëµØ
- 0
- ¿n¤À
- 65
- ÂI¦W
- 0
- §@·~¨t²Î
- WINXP
- ³nÅ骩¥»
- SP3
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2015-7-15
- ³Ì«áµn¿ý
- 2018-9-18
|
¥»©«³Ì«á¥Ñ daniel5168 ©ó 2015-8-4 15:18 ½s¿è
¦^´_ 8# GBKEE
¦hÁÂGBKEE ª©¥DÀ°¦£¸Ñµª,¸g¹L±zªº½s¼g,§Ú¶Ã§ï¥X°ÝÃD,lpk187¤j¤jªº«üÂI,§Ú¦A¶Ã§ï,²×©ó´ú¸Õ¦¨¥\
- Public uMode&, StartTime, EndTime
- Public MyBook As Workbook, Sht1 As Worksheet, Sht2 As Worksheet, xRow&
- Sub ¦@¥Î°Ñ·Ó()
- Set MyBook = ThisWorkbook
- Set Sht1 = MyBook.Sheets("¥x«üªñ¤@¤ÀÄÁ½u")
- StartTime = "08:44:50" '¶}½L®É¶¡¡]´£¦¤Q¬í¶}©l¡A¤~¥i°O¿ý¶}½L¶q»ù¡^"08:44:50"
- EndTime = "21:45:10" '¦¬½L®É¶¡¡]©µ«á¤Q¬í°±¤î°O¿ý¡^¦¹¬°´ú¸Õ¥Î®É¶¡¡A½Ð¦Û¦æ§ó§ï¥¿¦¡®É¶¡ "13:45:10"
- End Sub
- Sub ¦Û°Ê°O¿ý()
- Dim Rng As Range, º¦¶^ As Single, §¡»ù As Single
- If uMode = 0 Then Exit Sub
- With Sht1
- If Time > TimeValue(EndTime) Then '¦¬½L®É¶¡¥H«á¤£°õ¦æ
- .[F2] = "¤w¹L¦¬½L"
- uMode = 0
- Exit Sub
- End If
- Sht1.Range("B2") = Time '·í«e®É¶¡¡]®É¶¡½Xªí¡^
- '----------------------------------------------------------
- '¨C¢°¤ÀÄÁ°O¿ý¡A¢´¤ÀÄÁ«h§ï¬° Mod 5
- If Second(Time) = 0 And Minute(Time) Mod 1 = 0 Then
- Set Rng = .Range("A65536").End(xlUp).Offset(1)
- .Range("A" & Rng.Row & ":C" & Rng.Row).Value = .Range("A2:C2").Value
- With .Cells(Rng.Row, "C") '
- 'º¦¶^ªº©w¸qÀ³¸Ó¬O(³o¤ÀÄÁ¦¨¥æ»ù-¤W¤ÀÄÁ¦¨¥æ»ù)/¤W¤ÀÄÁ¦¨¥æ»ù
- If .Row >= 4 Then º¦¶^ = (.Cells - .Cells.Offset(-1))
- '20³æ¦ì¶g´Á§¡»ù
- If .Row >= 22 Then §¡»ù = Application.WorksheetFunction.Average(.Cells.Offset(-19).Resize(20))
- End With
- .Range("D2") = IIf(º¦¶^ <> 0, º¦¶^, "")
- .Range("E2") = IIf(§¡»ù <> 0, §¡»ù, "")
- .Range("D" & Rng.Row & ":E" & Rng.Row).Value = .Range("D2:E2").Value
- End If
- '------------------------------------------------
- End With
- If ActiveSheet.Name = Sht1.Name And xRow > 8 Then
- ActiveWindow.ScrollRow = xRow - 6 'Åý³Ì·s¸ê®Æ«O«ù¦b¥i¨£µøµ¡¤¤
- End If
- Beep
- '------------------------------------------------
- ThisWorkbook.Save '¦sÀÉ
- Application.OnTime Now + TimeValue("00:00:01"), "¦Û°Ê°O¿ý" '¨C¤@¬í»¼°j¤@¦¸
- End Sub
- Sub ¶}©l°õ¦æ()
- If uMode = 1 Then Exit Sub
- Call ¦@¥Î°Ñ·Ó
- uMode = 1
- Sht1.[F2] = "°õ¦æ¤¤"
- Call ¦Û°Ê°O¿ý
- End Sub
- Sub °±¤î°õ¦æ()
- uMode = 0
- Call ¦@¥Î°Ñ·Ó
- Sht1.[F2] = "STOP"
- End Sub
- Sub ²M°£°O¿ý¸ê®Æ()
- Beep
- If MsgBox("¡°½T©wn²M°£¡eSheet1¡fªº°O¿ý¶Ü¡H¡@", 4 + 32 + 256) = vbNo Then Exit Sub
- Call ¦@¥Î°Ñ·Ó
- Sht1.Rows("3:65536").ClearContents
- If ActiveSheet.Name = Sht1.Name Then ActiveWindow.ScrollRow = 1
- Beep
- End Sub
½Æ»s¥N½X |
|