檔案開啟自動更新
Private Sub Workbook_Open()
With Sheets("CF4")
For Each aa In Range(.[a9], .[a65536].End(xlUp).Offset(-1))
If aa <= Date Then
aa.Offset(, 5) = aa.Offset(-1, 5).Value
aa.Offset(, 6) = aa.Offset(-1, 6).Value
End If
Next
End With
End Sub作者: asimov 時間: 2010-6-16 00:36
回復 4#victorl
Private Sub Workbook_Open()
With Sheets("CF4")
For Each aa In Range(.[a9], .[a65536].End(xlUp).Offset(-1))
If aa <= Date Then
aa.Offset(, 5) = aa.Offset(-1, 5).Value
aa.Offset(, 6) = aa.Offset(-1, 6).Value
Else
Exit For '離開迴圈 以縮短時間
End If
Next
End With
End Sub作者: horce 時間: 2010-6-16 21:21