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

[µo°Ý] ½Ð±Ð­n°O¿ý1¤ÀKªº¶}°ª§C¦¬,­n¦p¦ó§ó§ï?

[µo°Ý] ½Ð±Ð­n°O¿ý1¤ÀKªº¶}°ª§C¦¬,­n¦p¦ó§ó§ï?

¥»©«³Ì«á¥Ñ °Ú¥§ ©ó 2014-5-25 02:44 ½s¿è

³o¬O¤p§Ì§ó§ïªº,¦ý¦³¬ö¿ýªº¼Æ­È°£¤F¶}½LÂI¬O¥i¯à¹ïªº,¨ä¥L³£¦³°ÝÃD
If Second(Time) = 0 And Minute(Time) Mod 1 = 0 Then

'¶ñ ¶}°ª§C¦¬¬°§Y®É¦æ±¡
                If Range("C8") <> "" Or Range("C8").Value < Range("C5").Value Then
                      Range("C8").Value = Range("C5").Value
                    End If
      '¶ñ³Ì°ª»ù
               If Range("D8").Value = "" Or Range("C8").Value > Range("D8").Value Then
                      Range("D8").Value = Range("C5").Value
                   End If
      '¶ñ³Ì§C»ù
               If Range("E8").Value = "" Or Range("C8").Value < Range("D8").Value Then
                      Range("E8").Value = Range("C5").Value
                    End If
   '¶ñ¦¬½L»ù,´N¬O§Y®É¦æ±¡
                 Range("F8").Value = Range("C5").Value
   End If

¥Îªº¬OE01ªºDDE,¥Ø«e¥H¹Dã´ú¸Õ!!


TEST 1¤ÀK.rar (69.51 KB)

¥»©«³Ì«á¥Ñ c_c_lai ©ó 2014-5-25 09:14 ½s¿è

¦^´_ 1# °Ú¥§
§A¬O¨C¤ÀÄÁ¤~¥h§ì¨ú¨C¤ÀÄÁ·í¤U¤§³Ì°ª¡B³Ì§C¡C
  1. If Second(Time) = 0 And Minute(Time) Mod 1 = 0 Then
  2.     '  ¶ñ ¶}°ª§C¦¬¬°§Y®É¦æ±¡
  3.      .
  4. End If
½Æ»s¥N½X
¦ý¦b¦¹¤@¤ÀÄÁ¤º¤§¨C¬í·í¤U¤¤³Ì°ª¡B³Ì§C«o±N¥¦©¿²¤¤F¡A
·íµM¦b¨C¤@¤ÀÄÁ«á¤§³Ì°ª¡B³Ì§C¥ç´N¦³©Ò®t²§¤F¡I
§â¥H¤W¤§ If ~ End If ¥h±¼«K¥i§Y®É±oª¾¨C¬í¤¤¤§
³Ì°ª¡B³Ì§Cªº»ù®æ¤F¡C

TOP

·PÁÂC¤j
§Ú¸Õ¸Õ¬Ý

TOP

c¤j,¦p§A»¡ªº®³±¼³o¬qªºif»Pend if
·|¥X²{¿ù»~¦b  Second(Time) = 0 And Minute(Time) Mod 1 = 0  ³o¤@¦æ?

TOP

¤£¦n·N«ä ,§Ú»~·|§Aªº·N«ä¤F,²{¦b®³±¼if »P end if
¤w¨S¥X²{¿ù»~,«Ý¶}½L¦b´ú¸Õ

TOP

°ª§CÂIÁÙ¬O§ì±o¤£·Ç

TOP

  1. Public uMode&, StartTime, EndTime
  2. Public MyBook As Workbook, Sht1 As Worksheet, Sht2 As Worksheet, xRow&
  3. Dim o As Single
  4. Dim h As Single
  5. Dim l As Single
  6. Dim c As Single
  7. Sub ¦@¥Î°Ñ·Ó()
  8. Set MyBook = ThisWorkbook
  9. Set Sht1 = MyBook.Sheets("Sheet1")
  10. StartTime = "02:34:00"  '¶}½L®É¶¡¡]´£¦­¤Q¬í¶}©l¡A¤~¥i°O¿ý¶}½L¶q»ù¡^"08:44:50"
  11. EndTime = "23:59:50"    '¦¬½L®É¶¡¡]©µ«á¤Q¬í°±¤î°O¿ý¡^¦¹¬°´ú¸Õ¥Î®É¶¡¡A½Ð¦Û¦æ§ó§ï¥¿¦¡®É¶¡ "13:45:10"
  12. End Sub
  13. Sub ¦Û°Ê°O¿ý()
  14. If uMode = 0 Then Exit Sub
  15. If Time > TimeValue(EndTime) Then '¦¬½L®É¶¡¥H«á¤£°õ¦æ
  16.     Sht1.[J8] = "¤w¹L¦¬½L"
  17.     uMode = 0
  18.     Exit Sub
  19. End If
  20. Sht1.Range("B8") = Time '·í«e®É¶¡¡]®É¶¡½Xªí¡^
  21. If Second(Time) = 0 And Minute(Time) Mod 1 = 0 Then '¨C¢°¤ÀÄÁ°O¿ý¡A¢´¤ÀÄÁ«h§ï¬° Mod 5
  22. xRow = Sht1.Range("A65536").End(xlUp).Row + 1
  23.   If xRow < 9 Then xRow = 9
  24.    Sht1.Range("A" & xRow & ":I" & xRow).Value = Sht1.Range("A8:I8").Value
  25.     o = 0: h = 0: l = 0: c = 0
  26.      If ActiveSheet.Name = Sht1.Name And xRow > 20 Then
  27.      ActiveWindow.ScrollRow = xRow - 10 'Åý³Ì·s¸ê®Æ«O«ù¦b¥i¨£µøµ¡¤¤
  28. End If
  29.    Beep
  30. GoTo xxx
  31. Else
  32. c = Sheets("sheet1").Cells(5, 3)
  33.    If c > h Then h = c
  34.    If c < l Then l = c
  35.    If o = 0 Then o = Sheets("sheet1").Cells(5, 3) Else o = o
  36.    If l = 0 Then l = Sheets("sheet1").Cells(5, 3) Else l = l
  37. Range("C8").Value = o
  38. Range("d8").Value = h '¶ñ³Ì°ª»ù
  39. Range("e8").Value = l '¶ñ³Ì§C»ù
  40. Range("f8").Value = c '¶ñ¦¬½L»ù
  41. xxx:
  42.    ThisWorkbook.Save   '¦sÀÉ
  43. End If
  44. Application.OnTime Now + TimeValue("00:00:01"), "¦Û°Ê°O¿ý"
  45. End Sub
½Æ»s¥N½X
¸Õ¬Ý¬Ý

TOP

·PÁ¤j¤jªº¦^À³
¥Ø«e¥H¹Dã´ú¸Õ  ¶}°ª§C¦¬ §ìªººâÆZ·Çªº
¦ý¬O¦n¹³®É¶¡·|®t¤@¤À  ¬Ý¤£¥X¨Óµ{¦¡¦b­þ¦h¤F¤@¤À

TOP

¦^´_ 7# f3202

f32022¤j ¤£¦n·N«ä ~§Ú¥u¬O¤p¾Ç¥Í·Q­n§ó¤F¸Ñ³o­Ó¤@¤ÀÄÁ¦Û°Ê°O¿ý¬O«ç»ò¹F¨ìªº,ÁÙ¤£¯à¤U¸üªþ¥óÀÉ!!¤£ª¾¹D¯à¤£¯àºI­Ó¹ÏÅý§Ú¬ã¨s¬ã¨s©O?«ô°U«ô°U!!

TOP

¦^´_ 9# gery


    http://www.FunP.Net/388336

TOP

        ÀR«ä¦Û¦b : ­n¤ñ½Ö§ó¨ü½Ö¡D¤£­n¤ñ½Ö§ó©È½Ö¡C
ªð¦^¦Cªí ¤W¤@¥DÃD