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

[µo°Ý] ¦p¦ó¥Îvba»s§@°Ê§@°±¤îªº´£¥Ü§iª¾

[µo°Ý] ¦p¦ó¥Îvba»s§@°Ê§@°±¤îªº´£¥Ü§iª¾


  • Function mainFunc3(sSheetName As String) As Long

  •   Dim i As Long

  •   With Sheets(sSheetName)

  •     i = .Cells(.Rows.Count, 1).End(xlUp).Row + 1

  •     .Cells(i, "A") = Format(Time, "Hh:Mm:Ss")   'ROW A¡A°O¿ý®É¶¡

  •     .Cells(i, "E").Resize(, 3).Value = .Cells(3, "B").Resize(, 3).Value  'B3-D3½Æ»s¨ìE4-G4

  •   End With

  •   mainFunc3 = i  '¦^¶Ç·í«e¦C¼Æ

  • End Function

  • Sub ButtonStart3()  '¶}©l«ö¶s

  •   If gbIsRunning1 = True Then

  •     If MsgBox("¤w¦³±Æµ{:" & gNextRunTime1 & "¡A¬O§_­«·s¬ö¿ý?", vbOKCancel) = vbOK Then

  •       ButtonStop3

  •     Else

  •       Exit Sub

  •     End If

  •   End If

  •   

  •   With ActiveSheet

  •     .Range("A4:G270").ClearContents

  •     gbIsRunning1 = True

  •     SetTimer3 .Name

  •   End With

  • End Sub



  • Sub ButtonStop3(Optional sSheetName As String)   '°±¤î«ö¶s

  •   gbIsRunning1 = False

  •   On Error Resume Next

  •   Application.OnTime gNextRunTime1, "'SetTimer3 """ & IIf(sSheetName <> "", sSheetName, ActiveSheet.Name) & """'", , False

  •   On Error GoTo 0

  • End Sub



  • Sub SetTimer3(sSheetName As String)

  •   Const MAX_ROW = 40

  •   gNextRunTime1 = Now + TimeValue("00:00:30")

  •   Application.OnTime gNextRunTime1, "'SetTimer3 """ & sSheetName & """'"

  •   If mainFunc3(sSheetName) >= MAX_ROW Then ButtonStop3 sSheetName '°õ¦æ¨Ã¦^¶Çrow

  • End Sub


³o¬O stillfish00 ¤j¤j±Ð§Úªºµ{¦¡½X¡A¥i¥H¨C30¬í°O¿ýDDE ©ÒÅܰʪº¼Æ¦r

¥i¬O¦³®É­Ô¦]¬°¬Y¨ÇÃö«Y(§Ú¦Û¤v¤]¨S¦³ª`·N¨ì®É)¡A³o­Ó¨C30¬í°O¿ýªº°Ê§@¡A¬ðµM¶¡¦Û¤v°±¤î¤F¡C

¦]¬°´N¬O¨S¦³ª`·N¨ì¡A©Ò¥Hµ¥¨ì§Úµo²{®É¡A¤w¸g¿ù¥¢¬ù10´X¤ÀÄÁªº°O¿ý¡C

¦]¦¹¡A·Q½Ð±Ð¦U¦ì¡A¦p¦ó§Q¥Î msgbox  ¨Ó§iª¾§Ú¡A³o­ÓÀx¦sªº°Ê§@°±¤î¤F©O¡H

§Ú¬O·Q¹L¬O¤£¬O¥i¥H§Q¥Î Àx¦sªº®É¶¡ ©M now() ¥h¤ñ¹ï¡A­Y¤w¸g¬Û®t30¬í¤F¡A«o¨S¦³·sªº°O¿ý¡A´N¥Î msgbox ³qª¾§Ú¡C

½Ð°Ý¡A³o¼Ë¥i¦æ¶Ü¡HÁÙ¦³¦³¨S¦³¤°»òµ{¦¡½X¥i¥H°Ñ¦Ò©O¡H

ÁÂÁ¦U¦ìªºÀ°¦£©M«ü±Ð¡AÁÂÁ¡C

  • Function mainFunc3(sSheetName As String) As Long

  •   Dim i As Long

  •   With Sheets(sShe ...
    ahsiek µoªí©ó 2013-11-14 10:26


  • ¼Æ­È°O¿ý.rar (337.91 KB) °ÝÃDµo¥Í¦b CC ¤u§@ªí¸Ì

    TOP

    ¦^´_ 2# ahsiek
    ButtonStop3 ¤º¥[msgbox

    TOP

    ¦^´_ 3# stillfish00
       
        ½Ð°Ý¡A§Ú³o¼Ë¼g¥X²{¤F°ÝÃD¡A§Ú¸Ó«ç»ò§ï¤~¦n¡C

       If ButtonStop3 = True Then MsgBox (" °Ê§@¤w°±¤î")
       End If

       ÁÂÁ¡C

    TOP

    ¦^´_ 4# ahsiek
    Sub ButtonStop3(Optional sSheetName As String)   '°±¤î«ö¶s
      gbIsRunning1 = False
      On Error Resume Next
      Application.OnTime gNextRunTime1, "'SetTimer3 """ & IIf(sSheetName <> "", sSheetName, ActiveSheet.Name) & """'", , False
      On Error GoTo 0
      MsgBox (" °Ê§@¤w°±¤î")
    End Sub

    TOP

    ¦^´_ 5# stillfish00


        ÁÂÁ¡A§Ú¸Õ¸Õ¬Ý¡A¦]¬°³o¨â¤Ñ¤S¤£·|¬ðµM°±¤îÀx¦sªº°Ê§@¡C¬Ý¬Ý¤§«á­Y¦³¥X²{¬ðµM°±¤îªº±¡§Î®É¡Amsgbox·|¤£·|¥X²{³qª¾§Ú¡C
        ¯uªº«ÜÁÂÁ stillfish00 ªºÀ°¦£¡C

    TOP

    ¦^´_ 3# stillfish00

    stillfish00¤j¤j¡A¤S¥X²{¬ðµM°±¤î°Ê§@ªº±¡§Î¤F¡A¥B¤]¨S¦³¥X²{msgbox§i¶D§Ú°Ê§@°±¤î¡C
    ¥­±`­Y¨ì¹F«ü©wªº¦C¼Æ®É¡A°Ê§@°±¤î®É¡Amsgbox ¬O·|¸õ¥X¨Ó¡A©Ò¥H³o­Óµ{¦¡½X¬O¨S¦³°ÝÃDªº¡C
    §Ú¦b²q¦³¥i¯à¬O¶}±Ò¨ä¥L¬¡­¶Ã¯©Î¬O¤°»ò°Ê§@®É¡AÅýµ{¦¡°±¤F¤U¨Ó¡A¥i§Ú¯uªº§ä¤£¥X­ì¦]¡C
    ¦]¬°µo²{µ{¦¡°±¤î®É¡A¤w¸g¬O¤@­Ó¤p®É¥H«á¤F¡K

    §Ú·Q°Ý»¡¡A¦³¨S¦³¤°»òµ{¦¡½X¥i¥H¨C¤@¤ÀÄÁÀˬd¤@¦¸¡A¬Ý¬Ýµ{¦¡¦³¨S¦³¦b§@Àx¦s°Ê§@©O¡H
    «D±`ÁÂÁ¡C

    TOP

            ÀR«ä¦Û¦b : §g¤l¬°¥Ø¼Ð¡A¤p¤H¬°¥Øªº¡C
    ªð¦^¦Cªí ¤W¤@¥DÃD