Problème macro

Bonjour,

J'aimerai modifier ma macro suivante :

Range("A1").Select
Range("A1").AddComment
Range("A1").Comment.Visible = False
Range("A1").Comment.Text Text:="comptabilite:" & Chr(10) & ""
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Height = 89.25
Selection.ShapeRange.Width = 135.75
End Sub

C'est à dire remplacer ma cellule "A1" par cellule active ou par plusieurs cellules soit "A1 à A10"

Comment faire ?

Isaser

2 réponses

  • Votes
  • Date
  • Date décroissante
  1. Contributeur
    Bonjour,

    pour la cellule active, remplacer A1 par
    ActiveCell
    .

    Pour une plage je sais pas.

    Cordialement.
    1. Modérateur
      Bonjour,

      Pour la cellule active :

      With ActiveCell.AddComment
          .Text "comptabilite:" & Chr(10) & ""
          .Visible = False
      End With


      Pour une plage de cellule :

      For Each cellule In Range("A1:A10").Cells
          With cellule.AddComment
          .Text "comptabilite:" & Chr(10) & ""
          .Visible = False
          End With
      Next
      --

      m@rina
      - "Sur le forum bureautique, on pose des questions concernant la bureautique..."
      - "Ah bon ???"