Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Protecting validation
I have created data validations sheet and want to protect from getting
spoiled through cut, paste, clear, etc. I have written following code but disabling the "Clear - All" and "Clear - Formats" is not working. Can somebody please help. Private Sub Worksheet_Activate() Dim eCtrl As CommandBarControl On Error Resume Next For Each eCtrl In Application.CommandBars eCtrl.FindControls(ID:=21).Enabled = 0 'Disable Ctrl-x eCtrl.FindControls(ID:=1964).Enabled = 0 'Disable Clear - All eCtrl.FindControls(ID:=872).Enabled = 0 'Disable Clear - Formats Next eCtrl With Application If .CutCopyMode = xlCut Then .CutCopyMode = False .OnKey "^x", "" .CellDragAndDrop = False .CopyObjectsWithCells = False End With End Sub -- Thanx & regards, Asif |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
protecting formulas without protecting sheet so grouping still wor | Excel Discussion (Misc queries) | |||
Protecting Data Validation List from being modified in the formulabar | Excel Programming | |||
Protecting cells with data validation | Excel Programming | |||
Protecting buttons with VB code rather than protecting sheets/books? | Excel Programming | |||
Protecting Data Validation from being overwritten | Excel Programming |