Bonjour,
J'ai reussi à trouver quelques chose je l'ai adapté pour moi et ça fonctionne pour l'instant
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 2 And Target.Count = 1 Then
répertoirePhoto = "Chemin d'accès" ' adapter
ech = 1
Target.ClearComments
nf = répertoirePhoto & Target & ".jpg"
If Dir(nf) <> "" Then
Target.AddComment
Target.Comment.Visible = True
Target.Comment.Shape.Fill.UserPicture nf
Set myShell = CreateObject("Shell.Application")
Set myFolder = myShell.Namespace(répertoirePhoto)
Set myFile = myFolder.Items.Item(Target & ".jpg")
Taille = myFolder.GetDetailsOf(myFile, 26)
Target.Comment.Shape.Height = 135
Target.Comment.Shape.Width = 170
Target.Comment.Shape.ScaleHeight ech, msoFalse, msoScaleFromTopLeft
Target.Comment.Shape.ScaleWidth ech, msoFalse, msoScaleFromTopLeft
Target.Comment.Visible = False
End If
End If
End Sub