Private Sub flex_BeforeEdit(ByVal Row As Long, ByVal Col As Long, Cancel As Boolean)
'开始编辑时确定是哪列哪行 , 因为程序中有些是不允许修改的
With flex
If .Col = 1 Or .Col = 2 Then
Cancel = True
End If
If .Row = .Rows - 1 Or .Row = .Rows - 2 Then
Cancel = True
End If
End With
End Sub