Private Sub 开放复制() With Application '屏蔽常用工具栏剪切、复制、粘贴 .CommandBars(3).Controls("剪切(&T)").Enabled = True .CommandBars(3).Controls("复制(&C)").Enabled = True .CommandBars(3).Controls("粘贴(&P)").Enabled = True '屏蔽单元格右键菜单中的剪切、复制、粘贴命令 .CommandBars("Cell").Controls("剪切(&T)").Enabled = True .CommandBars("Cell").Controls("复制(&C)").Enabled = True .CommandBars("Cell").Controls("粘贴(&P)").Enabled = True '屏蔽编辑菜单中的剪切、复制、粘贴命令 .CommandBars(1).Controls("编辑(&E)").Controls("剪切(&T)").Enabled = True .CommandBars(1).Controls("编辑(&E)").Controls("复制(&C)").Enabled = True .CommandBars(1).Controls("编辑(&E)").Controls("粘贴(&P)").Enabled = True '屏蔽键盘剪切、复制、粘贴键 .OnKey "^x" .OnKey "^c" .OnKey "^v" End With End Sub
|