请问如何将 DataGrid 控件的第一列锁定,使其不能更改,但其它的列可以更改。
请问如何将 DataGrid 控件的第一列锁定,使其不能更改,但其它的列可以更改。
谢谢!
[解决办法]
Private Sub DataGrid1_RowColChange(LastRow As Variant, ByVal LastCol As Integer)
If DataGrid1.Col = 1 Then
DataGrid1.AllowUpdate = False
Else
DataGrid1.AllowUpdate = True
End If
End Sub
[解决办法]
Private Sub Form_Load() DataGrid1.Columns(1).Locked = TrueEnd Sub