Bonjour,
Voilà la VBA qui me pose problème et si quelqu'un pouvait me conseiller.
Cordialement
Sub InsertLogo()
Dim I As Long
Dim xPath As String
Dim xShape As Shape
Dim xRg As Range
xPath = "D:\F1\F1 2021\Voitures 2021\Mercedes 2021.jpg"
If Dir(xPath) = "" Then
MsgBox "Picture file was not found in path!", vbInformation, "KuTools for Excel"
Exit Sub
End If
For I = 1 To ActiveWorkbook.Sheets.Count
Set xRg = Sheets(I).Range("C5")
Set xShape = Sheets(I).Shapes.AddPicture(xPath, True, True, xRg.Left, xRg.Top, xRg.Width, xRg.Height)
Next
End Sub