Private Sub line_info_AfterEdit(ByVal Row As Long, ByVal Col As Long) if col=1 then '判断编辑所在的列,只在第一列变化时,进行代码修改 If line_info.TextMatrix(Row, 1) = "-1" Then line_info.TextMatrix(Row, 3) = 10 line_info.TextMatrix(Row, 4) = 66 line_info.TextMatrix(Row, 5) = 61 ElseIf line_info.TextMatrix(Row, 1) = "0" Then line_info.TextMatrix(Row, 3) = 18 line_info.TextMatrix(Row, 4) = 76 line_info.TextMatrix(Row, 5) = 66 End If end if End Sub
if col=1 then '判断编辑所在的列,只在第一列变化时,进行代码修改
If line_info.TextMatrix(Row, 1) = "-1" Then
line_info.TextMatrix(Row, 3) = 10
line_info.TextMatrix(Row, 4) = 66
line_info.TextMatrix(Row, 5) = 61
ElseIf line_info.TextMatrix(Row, 1) = "0" Then
line_info.TextMatrix(Row, 3) = 18
line_info.TextMatrix(Row, 4) = 76
line_info.TextMatrix(Row, 5) = 66
End If
end if
End Sub