huongdakdoa
Thành viên mới
- Tham gia
- 26/1/09
- Bài viết
- 2
- Được thích
- 0
câu lệnh này trong VBA, còn trong VSTO thì sao
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Application.ScreenUpdating = False
ActiveSheet.Unprotect
Cells.Locked = False
Cells.SpecialCells(xlCellTypeConstants, 23).Locked = True
Cells.SpecialCells(xlCellTypeFormulas, 23).Locked = True
ActiveSheet.Protect
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Application.ScreenUpdating = False
ActiveSheet.Unprotect
Cells.Locked = False
Cells.SpecialCells(xlCellTypeConstants, 23).Locked = True
Cells.SpecialCells(xlCellTypeFormulas, 23).Locked = True
ActiveSheet.Protect
End Sub