- ©«¤l
- 48
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 60
- ÂI¦W
- 0
- §@·~¨t²Î
- windows7
- ³nÅ骩¥»
- office2010
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2013-4-9
- ³Ì«áµn¿ý
- 2019-12-17
|
[µ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¤ñ¹ï¡AY¤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 |
|