Bonjour,
J'ai mis en place cette Macro pour afficher en note un commentaire en fonction du texte dans ma case.
Je ne sais pas si ça vient de ça mais mon fichier à 1736 lignes...😅
du coup quand je change une donnée dans ma colonne F, celle avec les notes, le chargement est très long.
Peut-être que cela vient de la programmation...
Je commence tout juste avec le VBA donc j'ai besoin de l'aide d'experts 😊
Private Sub Worksheet_Change(ByVal Target As Range)
Dim chaine As String: Dim pos As Byte
Dim c As Excel.Comment
If Target.Column = 6 And Target.Count = 1 Then
Target.ClearComments
pos = Application.Match(Target.Value, Application.Index([Tableau8], , 1), 0)
chaine = [Tableau8].Cells(pos, 2) & vbLf
Target.AddComment chaine
For Each ws In Worksheets
For Each c In ws.Comments
c.Shape.TextFrame.Characters.Font.Bold = False
Next c
Next ws
End If
End Sub
Merci beaucoup pour votre aide.
Laurine
J'ai mis en place cette Macro pour afficher en note un commentaire en fonction du texte dans ma case.
Je ne sais pas si ça vient de ça mais mon fichier à 1736 lignes...😅
du coup quand je change une donnée dans ma colonne F, celle avec les notes, le chargement est très long.
Peut-être que cela vient de la programmation...
Je commence tout juste avec le VBA donc j'ai besoin de l'aide d'experts 😊
Private Sub Worksheet_Change(ByVal Target As Range)
Dim chaine As String: Dim pos As Byte
Dim c As Excel.Comment
If Target.Column = 6 And Target.Count = 1 Then
Target.ClearComments
pos = Application.Match(Target.Value, Application.Index([Tableau8], , 1), 0)
chaine = [Tableau8].Cells(pos, 2) & vbLf
Target.AddComment chaine
For Each ws In Worksheets
For Each c In ws.Comments
c.Shape.TextFrame.Characters.Font.Bold = False
Next c
Next ws
End If
End Sub
Merci beaucoup pour votre aide.
Laurine