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

[¤À¨É] VBA »y¥y¶° 200 ¥y

[¤À¨É] VBA »y¥y¶° 200 ¥y

¤§«e ajagow  ¤j¤j¤À¨É¤F ¹F¤HÁ`µ²ªºVBAºë¨åªº""¤K""Ãþ¦Ê±ø»y¥yª©¡A
¤p§Ì­Ó¤H¬°´M¨D¸Ñ¨Mµ{¦¡°ÝÃD¤Wºô§ä´M¸ê®Æ¡A«oµo²{¤F VBA »y¥y¶° 200 ¥yªº¤À¨É¡A
¨ä¤¤«e¥b¬q¬O²Ä¤@¿èªº¹F¤HÁ`µ²ªºVBAºë¨åªº""¤K""Ãþ¦Ê±ø»y¥yª©¡B¥H¤Î²Ä 2 ¿è ªº
VBA »y¥y¶° 100 ¥y¡A¦P®É¤]¬°¤F­Ó¤H¾\Äý¤è«K»P¥¿½T©Ê¡A©Ò¥Hµyµy¥[¥H¾ã²z¤@¤U¡A
¨Ã±N¥¦¶K¥Ü¥X¨Ó»P¤j®a¨Ó¦@¦P¤À¨É¬ã²ß¡A¥H¬è³Â»¶®a±Ú°Q½×±Úªº¦U¦ì³£±N¦¨¬°³Â»¶±j¤â¡I

¦]©«¤lªø«×¤£²Å¦X­n¨D¡C ·í«eªø«×: 29456 ¦r¸`¨t²Î­­¨î: 10 ¨ì 10000 ¦r¸`
©Ò¥H¥u¯à¨Ï¥Îªþ¥ó¶K¤W¡C

VBA »y¥y¶° 200 ¥y.rar (9.39 KB)

ÁÂÁÂC C LAIµL¨p¦a¤À¨É
´N¬O­n¨ÓÅý³Â»¶®a±ÚÅܱo§ó±j
³o¼Ëªº¦^ÂЦn¹³¦³½Ä¥Çª©³W
½Ðª©¤j¤H­ì½Ì
¤µ¤Ñ¬O¨º­Ó½L¤¤ DDE ¦sÀÉ»P VBA ªº¹ê»ÚÀ³¥Î½d¨Òµ{¦¡¡A¯uªº«Ü¶¶¤â
­T¶ë¹y¶}
¯qÁ¨à

TOP

©âªÅ¤S±N VBA »y¥y¶° 200 ¥y ±q¤å¦rÀÉ (Text) ¾ã²z¦Ü Adobe Reader ªº PDF ÀÉ¡A
§ó¤è«K¾\Äý¡A¶¶«K¤@¦P±N¥¦¤À¨É¥X¨Ó¡I
·q½Ð¯º¯Ç¡C

VBA »y¥y¶° 200 ¥y.pdf (333.83 KB)

TOP

¥»©«³Ì«á¥Ñ ajagow ©ó 2012-4-25 20:31 ½s¿è

¦^´_ 11# chenua


    ' ½L¤¤ DDE ¦sÀɪº¹ê»ÚÀ³¥Î½d¨Ò
Option Explicit
Dim actEnabled As Boolean
Dim index As Single

Private Sub Workbook_Open()

   If (Sheets("¤u§@ªí1").Range("AA1").Value = "") Then Sheets("¤u§@ªí1").Range("AA1").Value = "08:45:00"   ' °²³]AA1Äæ¦ì¬°ªÅ¥Õ¡A«h¼g¤J¶}½L°_©l®É¶¡

   If (Sheets("¤u§@ªí1").Range("AA2").Value = "") Then Sheets("¤u§@ªí1").Range("AA2").Value = "13:45:59"   ' AA2Äæ¦ì¥ç¦P¡C(¦¹¨âÄæ¬ö¿ý°_©l²×¤î®É¶¡)

   If (Sheets("¤u§@ªí1").Range("AA3").Value = "") Then Sheets("¤u§@ªí1").Range("AA3").Value = 0            ' ¬ö¿ý³Ì«á¸ê®Æ¶×¤J¤§¦C¸¹ (Rows)¡C

    If (Sheets("¤u§@ªí1").Range("AA4").Value = "") Then Sheets("¤u§@ªí1").Range("AA4").Value = "00:00:10"   ' ¬ö¿ý¸ê®Æ¶×¤J¬Û¹j®É¶¡¡A¦p¨C¹j¤Q¬í¼g¤J¤@¦¸¡C

    If (TimeValue(Now) > Sheets("¤u§@ªí1").Range("AA2").Value) Then       ' ¦pªG¥Ø«e®É¶¡·~¤w¶W¹LAA2ªº®É¬q¡A«h©I¥s.......

        Call stopProcedure

    Else                                                                  ' ¤Ï¤§¡A«h©I¥s.......

      Call startProcedure

   End If

End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)

    On Error Resume Next

   Call actStop

End Sub

Private Sub startProcedure()       ' «O¯d§@¬°±±¨î¶µ¤§À³¥Îµ{§Ç¡A¦p«ö¶s¤§¥¨¶°À³¥Îµ¥¡C

   Call actStart

End Sub

Private Sub stopProcedure()        ' «O¯d§@¬°±±¨î¶µ¤§À³¥Îµ{§Ç¡A¦p«ö¶s¤§¥¨¶°À³¥Îµ¥¡C

  Call actStop

End Sub

Sub Starter()

   If (actEnabled = True And TimeValue(Now) >= Sheets("¤u§@ªí1").Range("AA1").Value And TimeValue(Now) <= Sheets("¤u§@ªí1").Range("AA2").Value) Then

      index = Sheets("¤u§@ªí1").Range("AA3").Value

        If (Index = 0) Then Call newTitle  '°²³]newTitleµ{§Ç(¥Ñ¨Ï¥ÎªÌ¦Û¦æ©w¸q)¬O±N²Ä¤@¦Cªº¸ê®Æ©ïÀY¦WºÙ¼g¤J¨ì¤u§@ªí2¡C ¦p¡G¤é´Á¡B®É¶¡¡BR1C5ªº¹ïÀ³Äæ¦ì¸ê®Æµ¥¡C

        Sheets("¤u§@ªí1").Range("AA3").Value = index + 1       ' ¬ö¿ý¦C¸¹¥[¤@¡C

        Sheets("¤u§@ªí2").Cells(index + 2, 1).Value = Date

        Sheets("¤u§@ªí2").Cells(index + 2, 2).Value = TimeValue(Now)

       ' Sheets("¤u§@ªí2").Cells(index + 2, 3).Value = Sheets("¤u§@ªí1").Cells(1, 5).Value

        '

       ' ½Æ»s±q¨é°ÓDDE¶×¤J¤§¬Û¹ïÀ³¦ì¸m¸ê®Æ¡A¦p R1C5 ¹ïÀ³ªº¥i¯à¬O¦¬½L»ùµ¥µ¥¡C

        '

    End If

End Sub

Sub onStarter()

    Call Starter

    If actEnabled Then Call actStart

End Sub

Sub actStart()

    actEnabled = True

    Application.OnTime (Now + Sheets("¤u§@ªí1").Range("AA4").Value), "ThisWorkBook.onStarter"   ' ¼g¤J¸ê®Æªº±Æµ{ (¥Ø«e¬O¨C¹j¤Q¬í¼g¤J¤@¦¸)

End Sub

Sub actStop()

    actEnabled = False

    On Error Resume Next

    Application.OnTime Now, "ThisWorkBook.onStarter", , False

End Sub


³o¬O C C LAI ¤j¤jªºµ{¦¡
·PÁ±z­Ì
¯qÁ¨à

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡¦¨´N¤@¤Á¡j®É¶¡¥i¥H³y´N¤H®æ¡A¥i¥H¦¨´N¨Æ·~¡A¤]¥i¥HÀx¿n¥\¼w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD