ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¥Î®É¶¡±±¨îªºµ{¦¡¡A®É¶¡­n¸ó¹L¹j¤éªº VBA­n¦p¦ó¼g?

[µo°Ý] ¥Î®É¶¡±±¨îªºµ{¦¡¡A®É¶¡­n¸ó¹L¹j¤éªº VBA­n¦p¦ó¼g?

·Q­n¼g¤@¤äVBA  ¬ö¿ý ¥x«ü´Á"¤é½L"©M"¤È«á½L" ªº¸ê®Æ
¤È«á½L®É¶¡³o¤@¬q­n¸ó¨ì¹j¤Ñ¦­¤W¡A¼g¤£¥X¨Ó¡APO¤W¨Ó½Ð±Ð°ª¤H¡C

Sub ¦@¥Î°Ñ·Ó()
Set MyBook = ThisWorkbook
Set Sht1 = MyBook.Sheets("¥x«ü´Á")

If [A1] = "¤é½L" And Time >= TimeValue("08:44:00") And Time <= TimeValue("13:45:00")Then '¨Ì¾ÚÀx¦s®æA1ªº­È¬°"¤é½L"©Î"©]½L"--> ¿ï¾Ü"¤é½L"
     StartTime = "08:44:10"   '¤é½L¶}½L«e50¬í-->°õ¦æµ{¦¡
     EndTime = "13:45:10"     '¤é½L¦¬½L«á10¬í-->°±¤îµ{¦¡
End If


If [A1] = "©]½L" And Time >= TimeValue("15:00:00") And Time <= TimeValue("05:00:00") Then  '¿ï¾Ü©]½L(15:00:00 ~ ¹j¤é¦­¤W 05:00:00)

     StartTime = "14:59:10"  '©]½L¶}½L«e50¬í-->°õ¦æµ{¦¡
     EndTime = "05:00:10"    '©]½L¦¬½L«á10¬í-->°±¤îµ{¦¡

End If

End Sub

µ{¦¡®É¶¡¸ó¹j¤é.jpg (55.55 KB)

µ{¦¡®É¶¡¸ó¹j¤é.jpg

If Now >= (Date + 0 + TimeValue("15:00:00")) And _
   Now <= (Date + 1 + TimeValue("05:00:00")) Then
   
   ...............
End If

TOP

¥»©«³Ì«á¥Ñ ABK ©ó 2018-4-26 23:09 ½s¿è

¦^´_ 2# jackyq

§Ú¥é»s¤Fpcboy¤j µo°Ýªº¤å½g: "DDE¨C¤ÀÄÁ°O¿ýªº¸ê®Æ±Æ§Ç°ÝÃD"  [ http://forum.twbts.com/thread-20603-1-1.html ] ¸Ì­±ªºµ{¦¡½X¡C

±N¸ó¹j¤éªºCode ¼g¤J, ·Q°µ¦¨¥i¥H¶]¥x«ü"¤é½L"©M"¤È«á½L"¨C¤ÀÄÁªº¬ö¿ý,
°±¤î®É¶¡¨ºÃä¨S¼g¦n¡A «ö¶s±Ò°Ê"¦Û°Ê°O¿ý"«á , ¨S¦³¶]°_¨Ó !   ¤@ª½¥d¦b¦¬½L®É¶¡¡C

-- A1®æ¨ºÃä¥i¥H¿ï¾Ü"¤é½L"©Î"©]½L" --

1¤ÀÄÁ¬ö¿ý- ´ú¸ÕÀÉ-3.rar (80.11 KB)

TOP

´ú¬Ý¬Ý:
20120531a02(DDE¨C1¤À°O¿ý)-1.rar (20.31 KB)

TOP

¦^´_ 4# ­ã´£³¡ªL


ÁÂÁ­ã³ö¤j !      ¥u¯à»¡Åå¹Ä¡Aª©­±²M²n¦³¤O¡A¬Ý°_¨Ó«ÜµÎªA!   

¥i§_½Ð±Ð­ã³ö¤j ¸ê®Æ¬O¦p¦ó§ì¨úªº¡A ¤½¦¡©Mµ{¦¡¸Ì³£¨S¦³¬Ý¨ì¥ô¦ó¸ê®Æ·½ªº©I¥s¡A¤]¤£»Ý­n¶}¨÷°Óªº³nÅé¼Æ­È´N·|¶i¨Ó¡C

¤S³o¨Ç¼Æ­È¬Ý°_¨Ó©Ç©Çªº¡A¨Ò¦p¥x«ü ¡B¼¯¥x©M¥[Åvªº­È ¡A ÁÙ¬O»¡ A2:Q5¨º¤@°Ï¬O°²¸ê®Æ ¥Î¨Ó´ú¸Õ¬ö¿ýªºµ{¦¡?

2018-04-27_­ã³ö¤j.jpg (264.99 KB)

2018-04-27_­ã³ö¤j.jpg

TOP

¥»©«³Ì«á¥Ñ ­ã´£³¡ªL ©ó 2018-4-27 19:20 ½s¿è

¦^´_ 5# ABK


¨º¬O¥Î¶Ã¼Æ§@¬°´ú¸Õ¥Î, DDE¤½¦¡±o¦U¤H»Ý¨D¦Û¦æ¥h¼g~~~
¥D­n¬O¸Ñ¨M[¤é½L][©]½L]ªº°ÝÃD!

TOP

¥»©«³Ì«á¥Ñ ABK ©ó 2018-4-28 20:41 ½s¿è

¦^´_ 6# ­ã´£³¡ªL


  ÁÂÁ­ã³ö¤j !       ¤F¸Ñ¤F!
¦³¿ìªkÁקK ¦b¤w¸g°±¤î¬ö¿ý¤F¡A ¤S¥h«ö¤@¦¸"°±¤îÁä"®É ¤£·|¶]¥X¿ù»~°T®§¶Ü?
¦ý¬O¦A¥h«ö"°õ¦æ¬ö¿ý" ©M "²M°£¬ö¿ý¸ê®Æ"Áä ÁÙ¬O¥i¥HÄ~Äò¥¿±`¹B§@ !

TOP

¦^´_ 7# ABK

Sub °±¤î°õ¦æ()
uMode = 0
Call ¦@¥Î°Ñ·Ó
Sht1.[O8] = "STOP"
On Error Resume Next
Application.OnTime Next_Time, "¦Û°Ê°O¿ý", Schedule:=False
On Error GoTo 0
End Sub

TOP

¦^´_ 8# ­ã´£³¡ªL


    ÁÂÁ­ã³ö¤j!    OK¤F!

TOP

¦^´_ 4# ­ã´£³¡ªL

­ã³ö¤j±z¦n !
¦A½Ð±Ð¤@­Ó°ÝÃD¡A ¦pªG¦bµ{¦¡¶]¤F¤@¬q®É¶¡«á¡A§Ú­n²M°£¬ö¿ý¡A¦ý¬O­n«O¯d³Ì«á¤@µ§¬ö¿ý¨ÃÅý¥¦«O¯d¦b²Ä9¦æ¡A²M°£¸ê®Æªºµ{¦¡­n¦p¦ó§ï¼g?

«O¯d³Ì«á¤@¦æ¬ö¿ý¦^¨ì²Ä9¦æ.png (271.21 KB)

«O¯d³Ì«á¤@¦æ¬ö¿ý¦^¨ì²Ä9¦æ.png

TOP

        ÀR«ä¦Û¦b : ¨C¤ÑµL©Ò¨Æ¨Æ¡A¬O¤H¥Íªº®ø¶OªÌ¡A¿n·¥¡B¦³¥Î¤~¬O¤H¥Íªº³Ð³yªÌ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD