excel表格中~如何用Vba编写程序~A1单元格变化时~在A2显示更改时的时间
2017-08-07 · 知道合伙人软件行家
关注
展开全部
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Dim x As Integer
x = Target.Row
If x > 7 And x < 200 Then
If Target.Column = 1 And Target <> "" Then
Cells(x, 2) = Now()
ElseIf Target.Column =1 And Target = "" Then
Cells(x, 2) = ""
End If
End If
End Sub
On Error Resume Next
Dim x As Integer
x = Target.Row
If x > 7 And x < 200 Then
If Target.Column = 1 And Target <> "" Then
Cells(x, 2) = Now()
ElseIf Target.Column =1 And Target = "" Then
Cells(x, 2) = ""
End If
End If
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询