- ©«¤l
- 2834
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 2890
- ÂI¦W
- 0
- §@·~¨t²Î
- ¡e²¤¡f
- ³nÅ骩¥»
- ¡e²¤¡f
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¡e²¤¡f
- µù¥U®É¶¡
- 2013-5-13
- ³Ì«áµn¿ý
- 2024-11-23
|
¥»©«³Ì«á¥Ñ ã´£³¡ªL ©ó 2015-9-28 20:53 ½s¿è
µ{¦¡½X½Ð¦Û¦æ¥h®M¡A¦b¤u§@ªí¢°«Ø¨âÓ«ö¶s¡A¤À§O«ü©w¡e¶}©l¡f¤Î¡e°±¤î¡f¡A
¡e°±¤î¡f¶s¥Î¨Ó¼È°±µ{¦¡¡AÃö³¬Àɮ׫e¤]¥²¶·«ö¡e°±¤î¡f¦AÃö¡I
uP = ThisWorkbook.Path & "\"¡@¬O¤å¦rÀɸê®Æ§¨ªº¡e¸ô®|¡f¡A½Ð¦Û¦æ§ó§ï¹ê»Ú¸ô®|¡I
µ{¦¡½Xªì¬Ý»á½ÆÂø¡A®¤µLªk¤@¤@»¡©ú¡A¦³¥²n¥i·j¤@¤U½×¾Â¸ê®Æ¥hº¥¶i²z¸Ñ¡I
¡@- Public uMode&, uBook As Workbook, uSht As Worksheet, uDic As Object
- '======================================================
- ¡@
- Sub ¶}©l()
- Dim FN, xE As Range
- If uMode = 1 Then Exit Sub
- Set uBook = ThisWorkbook
- Set uSht = uBook.Sheets("¤u§@ªí1")
- Set uDic = CreateObject("Scripting.Dictionary")
- Set xE = uSht.Cells(1, Columns.Count).End(xlToLeft)
- For Each FN In Range(uSht.[B1], xE).Value
- ¡@¡@If FN Like "*.txt" Then uDic(FN) = 1
- Next
- uMode = 1
- Call ºÊµø
- End Sub
- ¡@
- '======================================================
- Sub °±¤î()
- uMode = 0
- Set uDic = Nothing
- End Sub
- ¡@
- '======================================================
- Sub ºÊµø()
- Dim uP$, xE As Range, TM, FL$, TT
- If uMode = 0 Then Exit Sub
- TM = Time
- uSht.[A5] = Format(TM, "hh:mm:ss")
- If Second(TM) = 0 And Minute(TM) Mod 5 = 0 Then¡@'³o¬O¨C¢´¤ÀÄÁ
- 'If Second(TM) Mod 5 = 0 Then¡@'³o¬O¨C¢´¬í
- ¡@¡@uP = ThisWorkbook.Path & "\"
- ¡@¡@Set xE = uSht.Cells(1, Columns.Count).End(xlToLeft)(1, 2)
- ¡@¡@Do
- ¡@¡@¡@¡@If FL = "" Then FL = Dir(uP & "*.txt") Else FL = Dir
- ¡@¡@¡@¡@If FL = "" Then Exit Do
- ¡@¡@¡@¡@If uDic(FL) = "" Then
- ¡@¡@¡@¡@¡@xE = FL: uDic(FL) = 1
- ¡@¡@¡@¡@¡@Open uP & FL For Input Access Read As #1
- ¡@¡@¡@¡@¡@¡@Line Input #1, TT
- ¡@¡@¡@¡@¡@¡@xE(3, 1) = TT
- ¡@¡@¡@¡@¡@Close #1
- ¡@¡@¡@¡@¡@Set xE = xE(1, 2)
- ¡@¡@¡@¡@End If
- ¡@¡@Loop
- ¡@¡@uBook.Save
- End If
- Application.OnTime Now + TimeValue("00:00:01"), "ºÊµø"
- End Sub
½Æ»s¥N½X ¡@ |
|