DEAR SIR
我不能上傳檔案 之前有看過前輩例子如下.
指定工作表讓 "覆製""貼上"無法使用之程式碼.
將圖一程式碼COPY至指定之工作表內即可.
圖一
Private Sub Worksheet_Activate()
Dim a As CommandBarControl
Application.OnKey "^c", ""
Application.OnKey "^v", ""
With Application.CommandBars.ActiveMenuBar.Controls("編輯(E)")
For Each a In .Controls
If a.ID = 19 Or a.ID = 22 Or a.ID = 21 Or a.ID = 755 Then
a.Enabled = False
End If
Next
End With
End Sub
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
Cancel = True
End Sub
Private Sub Worksheet_Deactivate()
Dim a As CommandBarControl
Application.OnKey "^c"
Application.OnKey "^v"
With Application.CommandBars.ActiveMenuBar.Controls("編輯(E)")
For Each a In .Controls
If a.ID = 19 Or a.ID = 22 Or a.ID = 21 Or a.ID = 755 Then
a.Enabled = True
End If
Next
End With
End Sub作者: enoch 時間: 2014-10-11 14:06