Option Explicit
Private RngSel As Range, RngCut As Range, Valeur
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not RngSel Is Nothing Then
Set RngCut = RngSel
Valeur = RngCut.Value
End If
Set RngSel = Target
End Sub
Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
Rem: Exécute d'abord aussi Worksheet_SelectionChange, finalisant ainsi la définition de RngCut et de Valeur.
On Error Resume Next
RngCut.ClearContents
If IsArray(Valeur) Then
Target.Resize(UBound(Valeur, 1), UBound(Valeur, 2)).Value = Valeur
Else: Target.Value = Valeur: End If
Cancel = Err = 0
End Sub