- ©«¤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
|
¦^´_ 26# dreamsway
·Q¸ß°Ý¥N½Xªº·N«ä¬O¨C¹L30¬í·|°õ¦æ°j°é¶Ü!? ¦]¬°³æ°õ¦æK¤ßºAsub¡A¥u·|°õ¦æ¤@¦¸±N²{¦³ªº³ø»ù¶]§¹¡A¸õ¥X«á´N¨S¦³¥ô¦ó°Ê§@
¬O¼Æ¾Ú¤w¶]¨ì¦¬½L®É¶¡¤F¶Ü?
½Ð¬Ý¤@¤Uµù¸Ñªº»¡©ú- Option Explicit
- Const ¶¡¹j = #12:05:00 AM# '³o¸Ìקï¤ÀÄÁ¶¡¹j
- Const ¶}½L = #8:45:00 AM#
- Sub K¤ßºA()
- Dim i As Long, Ti As Integer, ¦¨¥æ»ù As Double, ¦hÁ` As Long, ªÅÁ` As Long, ¤è¦V As String
- Dim xTime As Date, wTime As Date
- xTime = ¶}½L + ¶¡¹j
- i = 1: Ti = 0: ¦hÁ` = 0: ªÅÁ` = 0
- ¦¨¥æ»ù = Sheets("¦hªÅÂŹÏ").Range("M4") 'Äæ¦ì¼È¥N
- Do
- With Sheets("³ø»ù¼Æ¾Ú").Range("b1").Offset(i)
- '**¶¡¹j¬° #12:05:00 AM# ³o"¡ô","¡õ"¼Æ¾Ú ·Ç½T¶Ü?***
- If ¦¨¥æ»ù < .Cells(1, 2) Then ¤è¦V = "¡ô"
- If ¦¨¥æ»ù > .Cells(1, 2) Then ¤è¦V = "¡õ"
-
- If ¦¨¥æ»ù <= .Cells(1, 2) And ¤è¦V = "¡ô" Then ¦hÁ` = ¦hÁ` + .Cells(2, 3)
- If ¦¨¥æ»ù >= .Cells(1, 2) And ¤è¦V = "¡õ" Then ªÅÁ` = ªÅÁ` + .Cells(2, 3)
- ¦¨¥æ»ù = .Cells(1, 2)
- If .Value > xTime + ¶¡¹j Then
- With Sheets("´ú¸Õ").Range("A2").Offset(Ti)
- .Resize(, 3) = Array(xTime, ¦hÁ`, ªÅÁ`)
- .NumberFormatLocal = "hh:mm;@"
- End With
- xTime = xTime + ¶¡¹j: Ti = Ti + 1
- Else
- If .Cells.Offset(1) = "" And Format(TimeValue(.Cells.Text), "HH:MM") = "13:45" Then
- '***µ{¦¡¹B¦æ³t«×«Ü§Ö·|¶]§¹³ø»ù¼Æ¾Ú,®É¶¡¤w¨ì"13:45"¦¬½L ¤£¦A¦³¼Æ¾Ú¤F **
- xTime = xTime + ¶¡¹j
- With Sheets("´ú¸Õ").Range("A2").Offset(Ti)
- .Resize(, 3) = Array(xTime, ¦hÁ`, ªÅÁ`)
- .NumberFormatLocal = "hh:mm;@"
- End With
- Exit Do
- ElseIf .Cells.Offset(1) = "" Then
- '****µ{¦¡¹B¦æ³t«×«Ü§Ö·|¶]§¹³ø»ù¼Æ¾Ú,¦ý¬O¼Æ¾ÚÁÙ·|¦³ ¦]®É¶¡ÁÙ¥¼¨ì"13:45"¦¬½L ®É ... **
- '**µ{¦¡¨ì³o²z °õ¦æ «·s¾ã²z ªºµ{¦¡ ¦³§ó·s¨ì _20180724_Match ¹ï¶Ü? **
- '**********************************************
- Do
- If wTime > Time - #12:00:30 AM# Then '30¬í «·s¾ã²z ¤@¦¸
- '**¸Õµy«Ý¤@¤Uµ¥Ô·sªº¼Æ¾Ú
- Application.StatusBar = "«·s¾ã²z...."
- «·s¾ã²z '** §ó·s _20180724_Match ¦p¦³·sªº¸ê®Æ¶i¨Ó
- '*************************.Cells.Offset(1)´N <>"" ***
- wTime = Time
- End If
- DoEvents
- Loop While .Cells.Offset(1) = "" '**ÁÙ¬O¨S¦³·sªº¼Æ¾Ú´N¤@ª½µ¥Ô...
- '*** ¦p¦³·sªº¸ê®Æ¶i¨Ó Â÷¶}°j°é Ä~Äò¤U¥h¨ì i = i + 1 ªº¦a¤è ¦A Loop ¤U¥h ***
- Application.StatusBar = False
- End If
- End If
- End With
- DoEvents
- i = i + 1
- Loop
- MsgBox "¤u§@§¹¦¨"
- End Sub
½Æ»s¥N½X |
|