Couleur de certains points pour graphe excel

Fermé
denizette Messages postés 5 Date d'inscription mardi 17 juin 2008 Statut Membre Dernière intervention 25 juin 2008 - 23 juin 2008 à 13:59
denizette Messages postés 5 Date d'inscription mardi 17 juin 2008 Statut Membre Dernière intervention 25 juin 2008 - 25 juin 2008 à 10:26
Bonjour,

je suis entrain de créer une procédure en vba pour que si ma cellule est jaune alors la légende du point corresppondant sera en rouge et gras !

nom et truc sont des données que l'utilisateur choisi dans 2 combobox

Sub bidule (ByVal nom As String, ByVal truc As String)
Dim i, j, k As Integer
Dim toto As String
j = 0

Windows("idee.xls").Activate
Sheets("synthèse").Select

For k = 1 To 150
If Cells(k, 1) =truc Then
j = j + 1
toto = Cells(k, 3)

If Cells(k, 3).Interior.ColorIndex = 6 Then

For i = 1 To 4
Windows("graphes.xls").Activate
Charts(nom & "_graph").Select
ActiveChart.SeriesCollection(i).Points(j).DataLabel.Select
Selection.Characters.Text = toto
Selection.AutoScaleFont = False
With Selection.Characters(Start:=1, Length:=10).Font
.Name = "Arial"
.FontStyle = "Gras"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 3
End With
Next i

End If

End If

Next k

End Sub

il plante à "ActiveChart.SeriesCollection(i).Points(j).DataLabel.Select" en me disant impossible de lirer la propriété point de la classe series.

merci d'avance pour votre aide
A voir également:

1 réponse

denizette Messages postés 5 Date d'inscription mardi 17 juin 2008 Statut Membre Dernière intervention 25 juin 2008
25 juin 2008 à 10:26
s'il vous plait je vois pas du tout comment faire !!!!
0