ªð¦^¦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

¤w¸g¸Ñ¨M¤F!

TOP

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

ÁÂÁ­㴣¤j!  
°²³] §Úªº§Y®É¸ê®Æ¬O§e²{¦b C8: N8
§Ú·Q­n¥H«á¦b¦P¤@±i¹Ïªí¤W¤@°_§e²{"§Y®É¸ê®Æ"»P"¬ö¿ý¸ê®Æ",
¤]´N¬O·í§Ú"²M°£¬ö¿ý¸ê®Æ"«á¡AC9:N9ªº¼Æ­Èµ¥©ó C8:N8ªº¼Æ­È(§Y®Éªº),
¦b"°õ¦æ¬ö¿ý"±Ò°Ê«á:
·í²Ä¤@¤ÀÄÁµ²§ô®É, §Y®É¸ê®Æ«K°O¿ý¦bC9:N9¡A¥BÅܦ¨C10:N10»PC8:N8 ¦P¨B,
·í²Ä¤G¤ÀÄÁµ²§ô®É, §Y®É¸ê®Æ«K°O¿ý¦bC10:N10¡A¥BÅܦ¨C11:N11»PC8:N8 ¦P¨B,
·í²Ä¤T¤ÀÄÁµ²§ô®É, §Y®É¸ê®Æ«K°O¿ý¦bC11:N11¡A¥BÅܦ¨C12:N12»PC8:N8 ¦P¨B, ...............¡C
(¤]´N¬O¦b¬ö¿ý¸ê®Æ°Ïªº³Ì«á¤@¦C»P¤@ª½»P§Y®É¼Æ¾Ú¦P¨B)

¤@ª½¨ì§Ú¦A¦¸"²M°£¬ö¿ý¸ê®Æ"®É¡A ¤SÅܦ¨C9:N9»PC8:N8 ¦P¨B¤F¡C
³o¼Ëªºµ{¦¡½X­n¦p¦ó¼g ?

TOP

¦^´_ 14# ABK


Set xE = Sht1.[a65536].End(xlUp) §ï¦¨D

TOP

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


   ÁÂÁ­㴣¤j!  
   ¦Aµ¹§Ú°Ý¤@¤U!  (¤£¦n·N«ä! ¬ðµM·Q¨ì)
   ¦pªG°Ï¶¡¬O DÄæ¨ìNÄæ³o¤@°Ï¶ôªº¬ö¿ý ­n§R°£ ¡A «O¯d³Ì«á¤@µ§¬ö¿ý©ñ¨ì²Ä9¦C [D9:N9]¡A ¤S­n¦p¦ó¼g?
   
¤£¦n·N«ä!  ·Q»¡¥H«á¼gµ{¦¡·|¸I¨ì¤£¬O±qAÄæ¶}©lªº¸ê®Æ°Ï¡A ¥ý°Ý°_¨Ó©ñ !

TOP

¦^´_ 12# ABK


Range(Sht1.[N9], xE(0)).Delete Shift:=xlUp

TOP

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


ÁÂÁ­ã³ö¤j!     ¥Ñ©ó§Ú¹w­p¦b NÄ椧«á ¥[¤J¤@¨Çªí®æ¡A©Ò¥H¾ã¦Cªº§R°£·| §R¨ìNÄæ«á­±ªº¸ê®Æ¡C
§Ú¥u­n AÄæ¨ìNÄæ³o¤@°Ï¶ôªº¬ö¿ý §R°£ ¡A «O¯d³Ì«á¤@µ§¬ö¿ý©ñ¨ì²Ä9¦C [A9:N9]¡A ³o¤@¬q­n¦p¦ó­×¥¿?

TOP

¦^´_ 10# ABK


Sub ²M°£°O¿ý¸ê®Æ()
Dim xE As Range
If MsgBox("¡°½T©w­n²M°£¡eSheet1¡fªº°O¿ý¶Ü¡H¡@", 4 + 32 + 256) = vbNo Then Exit Sub
Call ¦@¥Î°Ñ·Ó
Set xE = Sht1.[a65536].End(xlUp)
If xE.Row <= 9 Then Exit Sub
Range(Sht1.[A9], xE(0)).EntireRow.Delete
If ActiveSheet.Name = Sht1.Name Then ActiveWindow.ScrollRow = 1
End Sub

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

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


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

TOP

        ÀR«ä¦Û¦b : ¤H­n¦Û·R¡A¤~¯à·R´¶¤Ñ¤Uªº¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD