Problème macro
isaser
-
m@rina Messages postés 27709 Date d'inscription Statut Modérateur Dernière intervention -
m@rina Messages postés 27709 Date d'inscription Statut Modérateur Dernière intervention -
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
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
-
Bonjour,
pour la cellule active, remplacer A1 parActiveCell
.
Pour une plage je sais pas.
Cordialement. -
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 ???"