[求助]多个单元格改动之后生成信息写到备注 Post By:2016/6/16 16:11:00 [显示全部帖子]
请问同一行,多个单元格被改动后如何生成信息,如某某在何时把某列改成XXX,写到备注栏里?
这样对吗
Dim nms() As String = {"列1","列2","列3"} Dim r As DataRow = e.DataRow Dim str As String = "" For Each c As String In nms If e.DataCol.Name = c Then str = r(c).OldValue & "改成" & r(c).NewValue & "." End If Next If str > "" Then e.DataRow("备注") = Date.Today & _UserName & "编辑:" & str.trim(".") End If