1,453
社区成员
发帖
与我相关
我的任务
分享
'若只编辑ID列,可以直接用col代替.ColIndex("ID")
Private Sub VSFlexGrid1_AfterEdit(ByVal Row As Long, ByVal Col As Long)
Dim i As Long
SendKeys "{ENTER}"
With VSFlexGrid1
For i = 0 To .Rows - 1
If .Cell(flexcpText, Row, .ColIndex("ID")) = .Cell(flexcpText, i, .ColIndex("ID")) And i <> Row Then
.Cell(flexcpText, i, .ColIndex("ID")) = ""
Exit For
End If
Next
End With
End Sub