- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¦^´_ 83# ÂŤÑÄR¦À
§Úªº³¡¤À¡G
ThisWorkbook¡G- Option Explicit
- Private Sub Workbook_Open()
- ' Nothing to do («O¯d)
- End Sub
½Æ»s¥N½X shtRTD(RTD)ªí³æ:- Option Explicit
- Private Sub Worksheet_Change(ByVal Target As Range)
- ' ·í Target (Á`¶q) Äæ¦ì¦³²§°Ê®É¡A «h¥h©I¥s RecordPrice ªº¤èªk (Method)¡C
-
- If Target.Row = 2 And Target.Column Mod 4 = 0 Then
- Call RecordPrice(Target)
- End If
- End Sub
½Æ»s¥N½X Module1:- Option Explicit
- Sub RecordPrice(TG As Range)
- Dim WR As Long, cts As Long
-
- With Sheets("RTD")
- If .Range("A1") < 1 Then Exit Sub
-
- cts = TG.Column
-
- WR = .Cells(Rows.Count, cts).End(xlUp).Row + 1 ' ¨D¨ú¸Ó²§°ÊÄæ¦ìªº³Ì«á¤@µ§¬ö¿ý¦C¦ì¸m
-
- If WR = 3 Or .Cells(WR - 1, cts) <> .Cells(2, cts) Then
- .Cells(WR, cts).Offset(, -3).NumberFormatLocal = "hh:mm:ss" ' ³]©wÀx¦s®æ®æ¦¡ (®É¶¡)
-
- .Cells(WR, cts).Offset(, -2).Resize(, 3) = .Range(TG.Address).Offset(, -2).Resize(, 3).Value
- End If
- End With
- End Sub
- Sub ®É¶¡()
- Sheets("RTD").Cells(2, 1) = WorksheetFunction.Text(Now(), "hh:mm:ss")
- Application.OnTime Now() + TimeValue("00:00¡G01"), "®É¶¡"
- End Sub
- Sub Cls()
- With Sheets("RTD")
- .Range("A3:OK5000").ClearContents
- .[A3].Select
- End With
- End Sub
½Æ»s¥N½X |
|