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

½Ð°Ýµ{¦¡°õ¦æ«á¤£©ú­ì¦]¦Û°Ê¤¤Â_(«e´X¤é¥¿±`)¬O§_¼gªk¦³»~?

½Ð°Ýµ{¦¡°õ¦æ«á¤£©ú­ì¦]¦Û°Ê¤¤Â_(«e´X¤é¥¿±`)¬O§_¼gªk¦³»~?

¥»©«³Ì«á¥Ñ fei6999 ©ó 2011-12-20 11:15 ½s¿è
  1. Sub ´Á³f()
  2. '¦bBÄæ¨Ì§Ç¼g¤JL2
  3. Dim nb, XC, DF, KJ As Long
  4. 'On Error Resume Next
  5.   If Time > TimeValue("13:45:20") Then Range("O1") = "OFF": Exit Sub
  6. nb = 0
  7. XC = 0
  8. DF = 0
  9. KJ = 0

  10. If Sheet1.Range("b3") > 0 Then Sheet1.Range("b2") = Sheet1.Range("b3"): Sheet1.Range("b3") = ""
  11. nb = IIf(Sheet1.Range("b2") = "", 2, Sheet1.Range("b3").End(xlUp).Row + 1)
  12. Sheet1.Cells(nb, 2) = Sheet1.Range("L2")
  13. If Sheet1.Range("b3") > 0 Then Sheet1.Range("C2") = "=B3-B2"
  14. If Sheet1.Range("C2") < 0 Then Sheet1.Range("C2") = ""

  15. If Sheet1.Range("b7") > 0 Then Sheet1.Range("b6") = Sheet1.Range("b7"): Sheet1.Range("b7") = ""
  16. XC = IIf(Sheet1.Range("b6") = "", 6, Sheet1.Range("b7").End(xlUp).Row + 1)
  17. Sheet1.Cells(XC, 2) = Sheet1.Range("J2")
  18. If Sheet1.Range("b7") > 0 Then Sheet1.Range("C6") = "=B7-B6"
  19. If Sheet1.Range("B7") = "" Then Sheet1.Range("C6") = ""

  20. If Sheet1.Range("C2") >= Sheet1.Range("E2") Then
  21. DF = IIf(Sheet1.Range("F2") = "", 2, Sheet1.Range("F20000").End(xlUp).Row + 1)
  22. Sheet1.Cells(DF, 6) = Sheet1.Range("C2")
  23. Sheet1.Cells(DF, 7) = Sheet1.Range("C6")
  24. End If

  25. KJ = IIf(Sheet1.Range("P2") = "", 2, Sheet1.Range("P20000").End(xlUp).Row + 1)
  26. Sheet1.Cells(KJ, 16) = Sheet1.Range("J4")
  27. Sheet1.Cells(KJ, 17) = Sheet1.Range("M4")
  28. Sheet1.Cells(KJ, 18) = Time
  29. Sheet1.Cells(KJ, 19) = Sheet1.Range("o4")

  30. If Range("O1") = "OFF" Then Exit Sub
  31. Application.OnTime Now + TimeValue("00:00:01"), "´Á³f" '±Ò°Ê¨C¹j1¬í°õ¦æ¥»µ{¦¡
  32. End Sub
½Æ»s¥N½X

´Á³f¦hªÅ¤ÀªR.rar (391.21 KB)

§Úµo²{¬O§Ú¦b¥t¤@­ÓEXCELÀɤu§@®Éµ{¦¡³º³Q¤¤Â_
²Ä¤@¦¸¹J¤W³oºØ±¡§Î
¤§«e¨Ã¨S¦³³o¼Ë¹L
³o±¡§Î¥¿±`¶Ü?

TOP

¦P¼Ëªº°Ê§@¤µ¤Ñ¥Ø«e¬°¤î«o¥¿±`¦³°÷©_©Ç!

TOP

À³¸Ó¬O¤Ö«Å§i³o¤@¦æ
Option Private Module
¥[¤W«á´N¹B§@¥¿±`
·PÁÂ!

TOP

        ÀR«ä¦Û¦b : ¨ü¤HÂI¤ô¤§®¦¡A¶··í´é¬u¥H³ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD