Disable Cut Copy and Paste

Submitted by Ivan F. Moala.

This program disables/enables all methods of cutting, copying, and pasting data in Excel: Option Private Module

Dim ComBar As CommandBar

Dim ComBarCtrl As CommandBarControl

Sub EnableAllClear() ' // Insert EnableControl 295, EnableControl 296, EnableControl 297, '// &Delete... EnableControl 478, EnableControl 292, EnableControl 293, EnableControl 294, EnableControl 847, '// Clear

EnableControl 3125, True EnableControl 1964, True EnableControl 872, EnableControl 873, EnableControl 874, '// CutCopyPaste EnableControl 21, True EnableControl 19, True EnableControl 22, True EnableControl 755, True '// ShortCut Keys With Application

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

True True True

True True True True True

True True True

// Clear Contents

// Formats

// Contents

// Comments

// pastespecial

0 0

Post a comment