完全限制一列這樣做: Private Sub Grid1_BeforeEdit(ByVal Row As Long, ByVal Col As Long, Cancel As Boolean) If Col = 2 Then Grid1.Editable = flexEDKbdMouse Else Grid1.Editable = flexEDKbd End If End Sub某些列鎖住 If Col = 2 Then If Grid1.TextMatrix(Grid1.row,0) = "什么什么" Then Cancel=True End If End If是用cancel還是用editable看你的情況了.
Private Sub Grid1_BeforeEdit(ByVal Row As Long, ByVal Col As Long, Cancel As Boolean)
If Col = 2 Then
Grid1.Editable = flexEDKbdMouse
Else
Grid1.Editable = flexEDKbd
End If
End Sub某些列鎖住
If Col = 2 Then
If Grid1.TextMatrix(Grid1.row,0) = "什么什么" Then
Cancel=True
End If
End If是用cancel還是用editable看你的情況了.