|
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
我在论坛找的这个代码,不能执行,报错,我的是excel2016 32位,win10系统
|
|