Bonsoir Snowkite,
Le code que tu affiches agit sur l'ensemble de la feuille. Sur les barres secondaires (clic droit).
Mais n'empêche pas d'utiliser les raccourcis claviers pour couper ou copier.
Et si tu souhaites n'appliquer ton choix que sur certaines cellules. Il conviendra d'utiliser l'événement SelectionChange de la feuille.
Ci-dessous un exemple fait sur la cellule F5 d'une feuille.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$F$5" Then
Dim oCtrl As Office.CommandBarControl
For Each oCtrl In Application.CommandBars.FindControls(ID:=21)
oCtrl.Enabled = False
Next oCtrl
For Each oCtrl In Application.CommandBars.FindControls(ID:=19)
oCtrl.Enabled = False
Next oCtrl
Application.OnKey "^{x}", ""
Application.OnKey "^{c}", ""
Else:
For Each oCtrl In Application.CommandBars.FindControls(ID:=21)
oCtrl.Enabled = True
Next oCtrl
For Each oCtrl In Application.CommandBars.FindControls(ID:=19)
oCtrl.Enabled = True
Next oCtrl
Application.OnKey "^{x}"
Application.OnKey "^{c}"
End If
End Sub
A adapter aux besoins en sélectionnant une plage de cellules contigües ou pas, au lieu d'une seule cellule (ici pour tester l'exemple).