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

¦p¦óÅý³Ì·sªº¸ê®Æ³£¼g¦b¤W­±??

¦p¦óÅý³Ì·sªº¸ê®Æ³£¼g¦b¤W­±??

ÅÜ°Ê°O¿ý.rar (20.51 KB)
Sub RecordPrice()
Dim WR As Long
Dim I As Long

WR = Range("A1").End(xlDown).Row + 1
[A2] = TimeValue(Now)
For I = 1 To 8
   Cells(WR, I) = Cells(2, I)
Next 'I
With ActiveWindow
        If Intersect(Cells(WR, "B"), .VisibleRange) Is Nothing Then .SmallScroll 1
    End With
End Sub

µ{¦¡½X¦p¤W¡A¥Ø«e¬O³Ì·s¸ê®Æ·|©¹¤U¼g¡A¦pªG§Ú­n§ï¦¨³Ì·sªº¸ê®Æ³£¥X²{¦bA3Äæ(´N¬O©¹¤W¼g)³oÃäWR = Range("A1").End(xlDown).Row + 1­n«ç»ò§ï??

­n³£¦bA3¿é¤J¸ê®Æ´N¥²¶·¼g¤J¸ê®Æ«e´¡¤J¤@¦C
Rows(3).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
[A2] = TimeValue(Now)
For I = 1 To 8
   Cells(3, I) = Cells(2, I)
Next 'I

TOP

¥»©«³Ì«á¥Ñ c_c_lai ©ó 2015-12-28 07:48 ½s¿è

¦^´_ 1# ÂŤÑÄR¦À
½Ð°Ñ¦Ò¡G
  1.     Application.ScreenUpdating = False
  2.    
  3.     With Sheets("RTD")
  4.         .Rows(3).Insert
  5.         .[A3].Resize(1, 8) = .[A2].Resize(1, 8).Value
  6.     End With
  7.     Application.ScreenUpdating = True
½Æ»s¥N½X

TOP

¦^´_ 2# koo


    K¤j§Ú¤W¦¸¤Ö¶K¤F¤@¨Çµ{¦¡½X¡A¦pªGÁÙ­n¥[¤WG2¦³Åܰʤ~¬ö¿ýªº±ø¥ó­n¦p¦ó­×§ï??

WR = Range("A1").End(xlDown).Row + 1
'ActiveWindow.ScrollRow = WR - 5 '¥uÅã¥Ü³Ì·s´Xµ§¸ê®Æ
If (WR = 3) Or _
   (Range("G" & WR - 1) <> Range("G2")) Then 'Á`¶q¦³²§°Ê®É¤~°O¿ý
   For I = 1 To 8
      Cells(WR, I) = Cells(2, I)
   Next 'I

TOP

¥»©«³Ì«á¥Ñ ÂŤÑÄR¦À ©ó 2015-12-28 14:23 ½s¿è

¦^´_ 3# c_c_lai


    C¤j¥i¥H§i¶D§Ú³o¨Çµ{¦¡½X­n¶K¦b­þ¸Ì¡AÁÙ¦³¨º¨Ç¦a¤è­n­×§ï¶Ü??
¥t¥~¡A¤§«e¦³¨Çµ{¦¡½X¨S¶K¨ì¡A©êºp
¸Ì­±ÁÙ¦³G2Åܰʤ~¬ö¿ýªº±ø¥ó

Sub RecordPrice()
Dim WR As Long
Dim I As Byte

If Range("H2") < 1 Then Exit Sub



WR = Range("A1").End(xlDown).Row + 1
'ActiveWindow.ScrollRow = WR - 5 '¥uÅã¥Ü³Ì·s´Xµ§¸ê®Æ
If (WR = 3) Or _
   (Range("G" & WR - 1) <> Range("G2")) Then 'Á`¶q¦³²§°Ê®É¤~°O¿ý
   For I = 1 To 8
      Cells(WR, I) = Cells(2, I)
   Next 'I
End If
Application.ScreenUpdating = False
    With Sheets("RTD")
        .Rows(3).Insert
        .[A3].Resize(1, 8) = .[A2].Resize(1, 8).Value
    End With
    Application.ScreenUpdating = True
End Sub

TOP

¥»©«³Ì«á¥Ñ c_c_lai ©ó 2015-12-28 19:20 ½s¿è

¦^´_ 5# ÂŤÑÄR¦À
  1. Sub RecordPrice()
  2.     Dim WR As Long

  3.     '  ActiveWindow.ScrollRow = WR - 5 '  ¥uÅã¥Ü³Ì·s´Xµ§¸ê®Æ
  4.     Application.ScreenUpdating = False

  5.     With Sheets("RTD")
  6.         If .Range("H2") < 1 Then Exit Sub

  7.         WR = Range("A1").End(xlDown).Row + 1
  8.         If (WR = 3) Or _
  9.                 (.Range("G" & WR - 1) <> .Range("G2")) Then  ' Á`¶q¦³²§°Ê®É¤~°O¿ý
  10.             .Rows(3).Insert
  11.             .[A3].Resize(1, 8) = .[A2].Resize(1, 8).Value
  12.             .[A3].Resize(1, 8).Font.FontStyle = "²ÊÅé"
  13.         End If
  14.     End With

  15.     Application.ScreenUpdating = True
  16. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¯¸¦b¥b¸ô¡A¤ñ¨«¨ì¥Ø¼Ð§ó¨¯­W¡C
ªð¦^¦Cªí ¤W¤@¥DÃD