Info

'// ToolBar Change CommandBars("ToolBar List").Enabled = True

End Sub

Sub DisAbleAllCLear() ' // Insert

EnableControl 295, False '// ..cells

EnableControl 296, False '// ..Rows

EnableControl 297, False '// ..Cols '// &Delete...

EnableControl 478, False '// Edit > Delete..

EnableControl 293, False '// Row

EnableControl 294, False '// Column

EnableControl 847, False '// RightClick Tab '// Clear

EnableControl 21, False '// cut

EnableControl 19, False '// copy

EnableControl 22, False '// paste

EnableControl 755, False '// pastespecial '// CutCopyPaste

EnableControl 3125, False '// Clear Contents

EnableControl 1964, False '// All

EnableControl 872, False '// Formats

EnableControl 873, False '// Contents

EnableControl 874, False '// Comments '// Short cut keys With Application

.OnKey "~c", "Dummy" .OnKey "~v", "Dummy" .OnKey "+{DEL>", "Dummy" .OnKey "+{INSERT}", "Dummy" .CellDragAndDrop = False .OnDoubleClick = "Dummy" End With

'// Toolbar change

CommandBars("ToolBar List").Enabled = False

End Sub

Sub EnableControl(iId As Integer, blnState As Boolean)

Dim ComBar As CommandBar

Dim ComBarCtrl As CommandBarControl

On Error Resume Next

For Each ComBar In Application.CommandBars

Set ComBarCtrl = ComBar.FindControl(Id:=iId, recursive:=True) If Not ComBarCtrl Is Nothing Then ComBarCtrl.Enabled = blnState

Next

End Sub

MsgBox "Sorry command not Available!1 End Sub

0 0

Post a comment