Bonjour,
J'ai un petit soucis avec ma macro, je voudrais qu'elle affiche les commentaires à gauche et non a droite de la cellule, est-il possible de faire ceci ?
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 5 And Target.Count = 1 Then
répertoirePhoto = "C:\Users\fguillemard\Documents\Photo QMOS\" ' 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, msoScaleFromTopRight
Target.Comment.Shape.ScaleWidth ech, msoFalse, msoScaleFromTopRight
Target.Comment.Visible = False
End If
End If
End Sub
Merci