- ©«¤l
- 75
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 371
- ÂI¦W
- 1
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2010-5-4
- ³Ì«áµn¿ý
- 2024-11-27
|
- Public uMode&, StartTime, EndTime
- Public MyBook As Workbook, Sht1 As Worksheet, Sht2 As Worksheet, xRow&
- Dim o As Single
- Dim h As Single
- Dim l As Single
- Dim c As Single
- Sub ¦@¥Î°Ñ·Ó()
- Set MyBook = ThisWorkbook
- Set Sht1 = MyBook.Sheets("Sheet1")
- StartTime = "02:34:00" '¶}½L®É¶¡¡]´£¦¤Q¬í¶}©l¡A¤~¥i°O¿ý¶}½L¶q»ù¡^"08:44:50"
- EndTime = "23:59:50" '¦¬½L®É¶¡¡]©µ«á¤Q¬í°±¤î°O¿ý¡^¦¹¬°´ú¸Õ¥Î®É¶¡¡A½Ð¦Û¦æ§ó§ï¥¿¦¡®É¶¡ "13:45:10"
- End Sub
- Sub ¦Û°Ê°O¿ý()
- If uMode = 0 Then Exit Sub
- If Time > TimeValue(EndTime) Then '¦¬½L®É¶¡¥H«á¤£°õ¦æ
- Sht1.[J8] = "¤w¹L¦¬½L"
- uMode = 0
- Exit Sub
- End If
- Sht1.Range("B8") = Time '·í«e®É¶¡¡]®É¶¡½Xªí¡^
- If Second(Time) = 0 And Minute(Time) Mod 1 = 0 Then '¨C¢°¤ÀÄÁ°O¿ý¡A¢´¤ÀÄÁ«h§ï¬° Mod 5
- xRow = Sht1.Range("A65536").End(xlUp).Row + 1
- If xRow < 9 Then xRow = 9
- Sht1.Range("A" & xRow & ":I" & xRow).Value = Sht1.Range("A8:I8").Value
- o = 0: h = 0: l = 0: c = 0
- If ActiveSheet.Name = Sht1.Name And xRow > 20 Then
- ActiveWindow.ScrollRow = xRow - 10 'Åý³Ì·s¸ê®Æ«O«ù¦b¥i¨£µøµ¡¤¤
- End If
- Beep
- GoTo xxx
- Else
- c = Sheets("sheet1").Cells(5, 3)
- If c > h Then h = c
- If c < l Then l = c
- If o = 0 Then o = Sheets("sheet1").Cells(5, 3) Else o = o
- If l = 0 Then l = Sheets("sheet1").Cells(5, 3) Else l = l
- Range("C8").Value = o
- Range("d8").Value = h '¶ñ³Ì°ª»ù
- Range("e8").Value = l '¶ñ³Ì§C»ù
- Range("f8").Value = c '¶ñ¦¬½L»ù
- xxx:
- ThisWorkbook.Save '¦sÀÉ
- End If
- Application.OnTime Now + TimeValue("00:00:01"), "¦Û°Ê°O¿ý"
- End Sub
½Æ»s¥N½X ¸Õ¬Ý¬Ý |
|