我有以下代码适用于某些人,但不适用于其他人。 打开电子表格时,以下步骤与之相反。 可能是它出色的设置吗?
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim Control As Office.CommandBarControl
Application.CommandBars("ply").Enabled = True 'disables right-Click on
sheet tab
For Each Control In Application.CommandBars.FindControls(ID:=21)
'disables CUT
Control.Enabled = True
Next Control For Each Control In
Application.CommandBars.FindControls(ID:=19) 'disables COPY
Control.Enabled = True
Next Control
Application.DisplayFormulaBar = True
Application.CutCopyMode = True
Application.CellDragAndDrop = True
End Sub