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

½Ð¦U¦ì¥ý¶iÀ°¦£ §ï§ÚªºVBA

ÁÂÁÂGBKEE
§Ú©ú¤Ñ¸Õ¸Õ¬Ý

¥t¥~
¤@©w­n©ñ¦bmodule¶Ü ?

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2010-10-19 21:45 ½s¿è

¦^´_ 10# junsean
If Time <= TimeValue("08:59:00") Then   
      Range("A3:I50000") = ""                  '²Ä¤@¦¸±ø¥ó¦¨¥ß®É°õ¦æ ¦p¦¹
ElseIf  Time >= TimeValue("09:00:00") And Time <= TimeValue("13:32:30") Then   
          ar = Array([A2], [B2], [C2], [D2], [E2], [F2], [G2], [H2], [I2])  '¥u¦³9­Ó¤¸¯À  
          [A65536].End(xlUp).Offset(1, 0).Resize(, 10) = ar
          Application.OnTime Time + TimeSerial(0, 0, 10), "yy"       '³o¸Ì´N¤£°õ¦æ¤F
End If
  1. Sub yy()
  2.     With Sheet1
  3.         If Time <= TimeValue("08:59:00") Then
  4.            .Range("A3:I50000") = ""
  5.            Application.OnTime TimeSerial(9, 0, 0), "yy"
  6.         End If
  7.         If Time >= TimeValue("09:00:00") And Time <= TimeValue("13:32:30") Then
  8.             ar = Array(.[A2], .[B2], .[C2], .[D2], .[E2], .[F2], .[G2], .[H2], .[I2],.[J2])
  9.             .[A65536].End(xlUp).Offset(1, 0).Resize(, 10) = ar
  10.             Application.OnTime Time + TimeSerial(0, 0, 10), "yy"
  11.         End If
  12.     End With
  13. End Sub
  14. Sub xx()
  15.     With Sheet2
  16.         If Time <= TimeValue("08:44:00") Then
  17.             .Range("A3:J50000") = ""
  18.             Application.OnTime TimeSerial(9, 0, 0), "xx"
  19.         End If
  20.         If Time >= TimeValue("08:45:00") And Time <= TimeValue("13:45:00") Then
  21.             ar = Array(.[A2], .[B2], .[C2], .[D2], .[E2], .[F2], .[G2])
  22.             .[A65536].End(xlUp).Offset(1, 0).Resize(, 7) = ar
  23.             Application.OnTime Time + TimeSerial(0, 1, 0), "xx"
  24.         End If
  25.     End With
  26. End Sub
½Æ»s¥N½X

TOP

¹³³o¼Ë¤l¶Ü

¹ï¤£°_   °ÝÃD³o»ò¦h
¦]¬°§Ú¬O¯uªºªù¥~º~
½Ð¦h¥]²[

TOP

Sub yy()

With Sheet1

If TimeValue(Format(Now, "hh:mm:ss")) <= TimeValue("08:59:00") Then
    Range("A3:I50000") = ""
   
Else
            
If TimeValue(Format(Now, "hh:mm:ss")) >= TimeValue("09:00:00") And TimeValue(Format(Now, "hh:mm:ss")) <= TimeValue("13:32:30") Then
   ar = Array([A2], [B2], [C2], [D2], [E2], [F2], [G2], [H2], [I2])
   [A65536].End(xlUp).Offset(1, 0).Resize(, 10) = ar
Application.OnTime Now + TimeSerial(0, 0, 10), "yy"

End If
End If
End With
End Sub

Sub xx()

With Sheet2

If TimeValue(Format(Now, "hh:mm:ss")) <= TimeValue("08:44:00") Then
    Range("A3:J50000") = ""
   
Else
            
If TimeValue(Format(Now, "hh:mm:ss")) >= TimeValue("08:45:00") And TimeValue(Format(Now, "hh:mm:ss")) <= TimeValue("13:45:00") Then
   ar = Array([A2], [B2], [C2], [D2], [E2], [F2], [G2])
   [A65536].End(xlUp).Offset(1, 0).Resize(, 7) = ar
Application.OnTime Now + TimeSerial(0, 0, 10), "xx"

End If
End If
End With
End Sub

TOP

§A¶·­nªº¥N½X¥i¥[¦b·sªº¥N½X¸Ì§r¡I

TOP

¥»©«³Ì«á¥Ñ junsean ©ó 2010-10-19 20:46 ½s¿è

¦]¬°­ì¨Óªº·|¦b
08:44:00¥H«e§R°£¬Q¤éªº°O¿ý
¨Ã¥B¦b
08:45:00¨ì13:45:00¦Û°Ê°O¿ý

¦pªG§R±¼­ì¨Óªº  ¤£´N¨S¦³³o¨Ç¥\¯à¤F
·Q¤W¶ÇÀÉ®×
«oµLªk¤W¶Ç

TOP

§A­ì¨Óªº¤£§R±¼¤@¤Á¥Õ·f¡C

TOP

§Ú¸Õ¤F
ÁÙ¬O¤@¼Ë  ¼Æ¾Ú¤@¦³ÅÜ°Ê  ´N¦Û°Ê°O¿ý
¨S¦³¶¡¹j1¤ÀÄÁ1¦¸

¬O§Ú­þ¸Ì·d¿ù¤F¶Ü

§Ú¬O³o¼Ë°µ
­ì¥»VBAªº¤£°Ê   ¦A±Noobird±z±Ðªº
©ñ¦bmodule1
³o¼Ë¹ï¶Ü?

TOP

§A¥²¶·¦b¥N½X¤¤«ü©w¤u§@ªí¡C
Sub yy()
with sheet1
ar = Array(.[A1], .[B1], .[C1], .[D1], .[E1], .[F1], .[G1], .[H1], .[I1], .[J1])
   .[A65536].End(xlUp).Offset(1, 0).Resize(, 10) = ar
Application.OnTime Now + TimeSerial(0, 0, 10), "yy"
end with
End Sub
---------------------------
Sub xx()
with sheet2
ar = Array(.[A1], .[B1], .[C1], .[D1], .[E1], .[F1], .[G1], .[H1], .[I1], .[J1])
   .[A65536].End(xlUp).Offset(1, 0).Resize(, 10) = ar
Application.OnTime Now + TimeSerial(0, 1, 0), "xx"
end with
End Sub

TOP

ÁÂÁÂoobird
§Ú¤µ¤Ñ¨Ó¸Õ¸Õ

¥t¥~½Ð°Ý   ¦pªG
sheet1   ·Q¨C¹j10¬í°O¿ý1¦¸
sheet2   ·Q¨C¹j1¤ÀÄÁ°O¿ý1¦¸

¨º­n«ç»ò¿ïmodule1    module2

TOP

        ÀR«ä¦Û¦b : ¹D¼w¬O´£ª@¦Û§Úªº©ú¿O¡A¤£¸Ó¬O¨þ¥¸§O¤HªºÃ@¤l¡C
ªð¦^¦Cªí ¤W¤@¥DÃD