- 帖子
- 365
- 主題
- 40
- 精華
- 0
- 積分
- 406
- 點名
- 0
- 作業系統
- Win 7
- 軟體版本
- OFFICE 2003
- 閱讀權限
- 20
- 註冊時間
- 2012-12-11
- 最後登錄
- 2024-8-24
|
7#
發表於 2016-9-14 18:23
| 只看該作者
回復 6# c_c_lai
C大我也有請教他,另外
Private Sub Worksheet_Calculate()
Application.EnableEvents = False.............所以是加在這邊
Call RecordPrice
Application.EnableEvents = True..............還有這邊嗎??
End Sub
..............................................................................................................................................................................
Sub RecordPrice()
Dim WR As Long
Dim I As Byte
If Range("E2") < 1 Then Exit Sub
WR = Range("A1").End(xlDown).Row + 1
If (WR = 3) Or _
((Second(Range("A2")) Mod 5) = 1) Then
Application.EnableEvents = False.................這邊
Cells(WR, 1).Resize(, 4) = [A2:D2].Value
Application.EnableEvents = True...................還有這邊
End If
End Sub
加在上面這兩個地方有甚麼不同?? |
|