Soucis de macro commentaire

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

Bonjour,

ça ne me semble pas possible de mémoriser cette position en mode pop-up.

Tu peux utiliser des variantes de cette macro :

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim o
On Error Resume Next
For Each o In UsedRange
o.Comment.Visible = False
Next
ActiveCell.Comment.Shape.Left = ActiveCell.Left - 110
ActiveCell.Comment.Visible = True
End Sub

A+

Rechercher des sujets similaires à "soucis macro commentaire"