- ©«¤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
|
¦^´_ 1# jimmy121212 - Option Explicit
- 'Àɮ׶}±Ò®É ¦Û°Ê°õ¦æªºµ{¦¡ '½Ð½Æ»s¨ìThisWorkbook ªº¼Ò²Õ
- Private Sub Workbook_Open() 'ThisWorkbook ªº¹w³]¨Æ¥ó
- Dim E As Range
- With Sheets("SHEET1").Range("C3:C303") 'With : ¨C¤ÀÄÁªº½d³ò [Àx¦s®æ]ª«¥ó¤¤
- .Offset(, 1).Resize(, 3) = "" '²M²z¥ý«e¸ê®Æ
- For Each E In .Cells '¨C¤ÀÄÁªº½d³ò¤º³B²z®É¶¡
- If E >= Time Then Application.OnTime E, "ThisWorkbook.EX"
- '[Àx¦s®æ] ®É¶¡¤j©óµ¥©ó ²{¦b®É¶¡
- 'OnTime ¤èªk ¦w±Æ¤@Óµ{§Ç¦b±N¨Óªº¯S©w®É¶¡°õ¦æ (¬J¥i¬°¬YÓ¤é´Áªº«ü©w®É¶¡¡A¤]¥i¬°«ü©wªº®É¶¡¤§«á)¡C
- Next
- End With
- End Sub
- Sub Ex() '°O¿ýdde¨C¤ÀÄÁÅܧ󪺸ê®Æ '½Ð½Æ»s¨ìThisWorkbook ªº¼Ò²Õ
- Dim Rng As Range, F As Range
- With Sheets("SHEET1")
- Set Rng = .Range("D2:F2") 'n°O¿ýªº¸ê®Æ½d³ò
- ' ¨C¤ÀÄÁªº½d³ò ¤¤ ´M§ä ²{¦bªº®É¶¡
- Set F = .Range("C3:C303").Find(Format(Time, "hh:mm"), LookIn:=xlValues)
- 'Not F Is Nothing :§ä¨ì«á¦b ,[²{¦bªº®É¶¡],Offset(0, 1): ¥k²¾¤@Äæ Resize(1, 3): ÂX¥R1¦C3Ä檺½d³ò = n°O¿ýªº¸ê®Æ
- If Not F Is Nothing Then F.Offset(0, 1).Resize(1, 3) = Rng.Value '
- End With
- End Sub
½Æ»s¥N½X |
|