1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| Sub CopyPasteRange(ByRef WksDest As Worksheet, ByVal str_PlageSrc As String, str_PlageDest As String)
Dim StrPlage As String
Dim LngCutCopyMode As Long
Application.EnableEvents = False
Application.EnableLivePreview = False
Application.EnableAutoComplete = False
Application.EnableAnimations = False
Application.EnableLivePreview = False
LngCutCopyMode = Application.CutCopyMode
Call VidePressePapier
Application.CutCopyMode = xlCopy
With Worksheets(WksDest.Name)
StrPlage = Replace(str_PlageSrc, "$", "")
.Range(StrPlage).Copy
StrPlage = Replace(str_PlageDest, "$", "")
.Range(StrPlage).PasteSpecial _
Paste:=xlPasteAll, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
End With
Application.CutCopyMode = LngCutCopyMode
Application.EnableEvents = True
Application.EnableLivePreview = True
Application.EnableAutoComplete = True
Application.EnableAnimations = False
Application.EnableLivePreview = False
End Sub |
Partager