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 32 33 34 35
|
Sub Macro5()
'
Application.ScreenUpdating = False
'
' La DESTINATION" de l'image transférée sera toujours Cells(7,4)
' ------------------------------------------------------------------
'
'
' 8 images sont à transférer ( toujours en ligne 7 et Colonnes 97, 99, 101, 103, 105, 107, 109, 111)
' --------------------------------------------------------------------------------------------------
'
For n = 1 To 8
Col = (n * 2) + 95
'
' Effacement de la zone réception
' -------------------------------
For Each s In ActiveSheet.Shapes
If Not Intersect(s.TopLeftCell, Range("C6:E8")) Is Nothing Then
s.Delete
End If
Next s
'
' Transfert d'une des 8 images "ORIGINE" vers la "DESTINATION"
' -----------------------------------------------------------
Cells(7, Col).Select
Selection.Copy
Cells(7, 4).Select
ActiveSheet.Paste
Application.ScreenUpdating = True ' pour rendre visible l'image transférée
Application.ScreenUpdating = False ' --------------------------------------
Sleep 300
Next
'
End Sub |
Partager