Bonjour à tous
Je suis toujours sur le fichier de Serge Garneau modifié Michel Pierron
J’ai un module de classe dans lequel une macro examine différent cas pour
modifier les couleurs de la série 1 et 2
1 )Première version qui essaie de traiter le cas des courbes cette macro
fonctionne bien :
Case 8
‘Traite le cas des courbes
If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "Line", 1) Then
With .ChartObjects("graphe").Chart.SeriesCollection(1).Border
.ColorIndex = iColor
.Weight = xlMedium
.LineStyle = xlContinuous
End With
With .ChartObjects("graphe").Chart.SeriesCollection(1)
.MarkerBackgroundColorIndex = xlNone
.MarkerForegroundColorIndex = xlNone
.MarkerStyle = xlNone
.Smooth = False
.MarkerSize = 5
.Shadow = False
End With
‘N’est pas une courbe
Else
With .ChartObjects("graphe").Chart.SeriesCollection(1)
.Border.Weight = 1
.Border.LineStyle = -1
.Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4,
Degree:=0.231372549019608
.Fill.Visible = True
.Fill.ForeColor.SchemeColor = iColor
End With
End If
2 ) Deuxième version qui essaie de traiter le cas des nuages de points cette
macro fonctionne bien :
Case 8
‘Traite le cas Nuage de points non reliés
If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "4169", 1) Then
With .ChartObjects("graphe").Chart.SeriesCollection(1).Border
.Weight = xlHairline
.LineStyle = xlNone
End With
With .ChartObjects("graphe").Chart.SeriesCollection(1)
.MarkerBackgroundColorIndex = iColor
.MarkerForegroundColorIndex = iColor
.MarkerStyle = xlDiamond
.Smooth = False
.MarkerSize = 5
.Shadow = False
End With
Else
With .ChartObjects("graphe").Chart.SeriesCollection(1)
.Border.Weight = 1
.Border.LineStyle = -1
.Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4,
Degree:=0.231372549019608
.Fill.Visible = True
.Fill.ForeColor.SchemeColor = iColor
End With
End If
3 ) Troisième version qui veut traiter les courbe et nuages de points ne
marche plus pour les courbes où est l’erreur ?
Case 8
‘Pouquoi ce qui suit ne marche plus pour les courbes ?
If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "Line", 1) Then
With .ChartObjects("graphe").Chart.SeriesCollection(1).Border
.ColorIndex = iColor
.Weight = xlMedium
.LineStyle = xlContinuous
End With
With .ChartObjects("graphe").Chart.SeriesCollection(1)
.MarkerBackgroundColorIndex = xlNone
.MarkerForegroundColorIndex = xlNone
.MarkerStyle = xlNone
.Smooth = False
.MarkerSize = 5
.Shadow = False
End With
End If
‘Ce qui suit fonctionne
If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "4169", 1) Then
With .ChartObjects("graphe").Chart.SeriesCollection(1).Border
.Weight = xlHairline
.LineStyle = xlNone
End With
With .ChartObjects("graphe").Chart.SeriesCollection(1)
.MarkerBackgroundColorIndex = iColor
.MarkerForegroundColorIndex = iColor
.MarkerStyle = xlDiamond
.Smooth = False
.MarkerSize = 5
.Shadow = False
End WithElse
With .ChartObjects("graphe").Chart.SeriesCollection(1)
.Border.Weight = 1
.Border.LineStyle = -1
.Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4,
Degree:=0.231372549019608
.Fill.Visible = True
.Fill.ForeColor.SchemeColor = iColor
End With
End If
ci-joint dernière version : http://cjoint.com/?ftkxgDxgCJ
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Michel Pierron
Bonjour jean-Paul; Essaie avec celui-ci: http://cjoint.com/?ftnMbaoZXs Si tu as un souci, contacte moi en bal perso.
MP
"Jean-Paul V" a écrit dans le message de news:
Bonjour à tous Je suis toujours sur le fichier de Serge Garneau modifié Michel Pierron
J'ai un module de classe dans lequel une macro examine différent cas pour modifier les couleurs de la série 1 et 2
1 )Première version qui essaie de traiter le cas des courbes cette macro fonctionne bien : Case 8 'Traite le cas des courbes If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "Line", 1) Then With .ChartObjects("graphe").Chart.SeriesCollection(1).Border .ColorIndex = iColor .Weight = xlMedium .LineStyle = xlContinuous End With With .ChartObjects("graphe").Chart.SeriesCollection(1) .MarkerBackgroundColorIndex = xlNone .MarkerForegroundColorIndex = xlNone .MarkerStyle = xlNone .Smooth = False .MarkerSize = 5 .Shadow = False End With 'N'est pas une courbe Else With .ChartObjects("graphe").Chart.SeriesCollection(1) .Border.Weight = 1 .Border.LineStyle = -1 .Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4, Degree:=0.231372549019608 .Fill.Visible = True .Fill.ForeColor.SchemeColor = iColor End With End If
2 ) Deuxième version qui essaie de traiter le cas des nuages de points cette macro fonctionne bien : Case 8 'Traite le cas Nuage de points non reliés If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "4169", 1) Then With .ChartObjects("graphe").Chart.SeriesCollection(1).Border .Weight = xlHairline .LineStyle = xlNone End With With .ChartObjects("graphe").Chart.SeriesCollection(1) .MarkerBackgroundColorIndex = iColor .MarkerForegroundColorIndex = iColor .MarkerStyle = xlDiamond .Smooth = False .MarkerSize = 5 .Shadow = False End With Else With .ChartObjects("graphe").Chart.SeriesCollection(1) .Border.Weight = 1 .Border.LineStyle = -1 .Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4, Degree:=0.231372549019608 .Fill.Visible = True .Fill.ForeColor.SchemeColor = iColor End With End If
3 ) Troisième version qui veut traiter les courbe et nuages de points ne marche plus pour les courbes où est l'erreur ? Case 8 'Pouquoi ce qui suit ne marche plus pour les courbes ? If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "Line", 1) Then With .ChartObjects("graphe").Chart.SeriesCollection(1).Border .ColorIndex = iColor .Weight = xlMedium .LineStyle = xlContinuous End With With .ChartObjects("graphe").Chart.SeriesCollection(1) .MarkerBackgroundColorIndex = xlNone .MarkerForegroundColorIndex = xlNone .MarkerStyle = xlNone .Smooth = False .MarkerSize = 5 .Shadow = False End With End If 'Ce qui suit fonctionne If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "4169", 1) Then With .ChartObjects("graphe").Chart.SeriesCollection(1).Border .Weight = xlHairline .LineStyle = xlNone End With With .ChartObjects("graphe").Chart.SeriesCollection(1) .MarkerBackgroundColorIndex = iColor .MarkerForegroundColorIndex = iColor .MarkerStyle = xlDiamond .Smooth = False .MarkerSize = 5 .Shadow = False End WithElse With .ChartObjects("graphe").Chart.SeriesCollection(1) .Border.Weight = 1 .Border.LineStyle = -1 .Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4, Degree:=0.231372549019608 .Fill.Visible = True .Fill.ForeColor.SchemeColor = iColor End With End If
ci-joint dernière version : http://cjoint.com/?ftkxgDxgCJ
Merci à ceux qui peuvent m'aider je suis en panne
Bonjour jean-Paul;
Essaie avec celui-ci:
http://cjoint.com/?ftnMbaoZXs
Si tu as un souci, contacte moi en bal perso.
MP
"Jean-Paul V" <JeanPaulV@discussions.microsoft.com> a écrit dans le message
de news: 501EEA07-920C-4F96-8369-57692A4E95BD@microsoft.com...
Bonjour à tous
Je suis toujours sur le fichier de Serge Garneau modifié Michel Pierron
J'ai un module de classe dans lequel une macro examine différent cas pour
modifier les couleurs de la série 1 et 2
1 )Première version qui essaie de traiter le cas des courbes cette macro
fonctionne bien :
Case 8
'Traite le cas des courbes
If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "Line", 1) Then
With .ChartObjects("graphe").Chart.SeriesCollection(1).Border
.ColorIndex = iColor
.Weight = xlMedium
.LineStyle = xlContinuous
End With
With .ChartObjects("graphe").Chart.SeriesCollection(1)
.MarkerBackgroundColorIndex = xlNone
.MarkerForegroundColorIndex = xlNone
.MarkerStyle = xlNone
.Smooth = False
.MarkerSize = 5
.Shadow = False
End With
'N'est pas une courbe
Else
With .ChartObjects("graphe").Chart.SeriesCollection(1)
.Border.Weight = 1
.Border.LineStyle = -1
.Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4,
Degree:=0.231372549019608
.Fill.Visible = True
.Fill.ForeColor.SchemeColor = iColor
End With
End If
2 ) Deuxième version qui essaie de traiter le cas des nuages de points
cette
macro fonctionne bien :
Case 8
'Traite le cas Nuage de points non reliés
If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "4169", 1) Then
With .ChartObjects("graphe").Chart.SeriesCollection(1).Border
.Weight = xlHairline
.LineStyle = xlNone
End With
With .ChartObjects("graphe").Chart.SeriesCollection(1)
.MarkerBackgroundColorIndex = iColor
.MarkerForegroundColorIndex = iColor
.MarkerStyle = xlDiamond
.Smooth = False
.MarkerSize = 5
.Shadow = False
End With
Else
With .ChartObjects("graphe").Chart.SeriesCollection(1)
.Border.Weight = 1
.Border.LineStyle = -1
.Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4,
Degree:=0.231372549019608
.Fill.Visible = True
.Fill.ForeColor.SchemeColor = iColor
End With
End If
3 ) Troisième version qui veut traiter les courbe et nuages de points ne
marche plus pour les courbes où est l'erreur ?
Case 8
'Pouquoi ce qui suit ne marche plus pour les courbes ?
If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "Line", 1) Then
With .ChartObjects("graphe").Chart.SeriesCollection(1).Border
.ColorIndex = iColor
.Weight = xlMedium
.LineStyle = xlContinuous
End With
With .ChartObjects("graphe").Chart.SeriesCollection(1)
.MarkerBackgroundColorIndex = xlNone
.MarkerForegroundColorIndex = xlNone
.MarkerStyle = xlNone
.Smooth = False
.MarkerSize = 5
.Shadow = False
End With
End If
'Ce qui suit fonctionne
If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "4169", 1) Then
With .ChartObjects("graphe").Chart.SeriesCollection(1).Border
.Weight = xlHairline
.LineStyle = xlNone
End With
With .ChartObjects("graphe").Chart.SeriesCollection(1)
.MarkerBackgroundColorIndex = iColor
.MarkerForegroundColorIndex = iColor
.MarkerStyle = xlDiamond
.Smooth = False
.MarkerSize = 5
.Shadow = False
End WithElse
With .ChartObjects("graphe").Chart.SeriesCollection(1)
.Border.Weight = 1
.Border.LineStyle = -1
.Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4,
Degree:=0.231372549019608
.Fill.Visible = True
.Fill.ForeColor.SchemeColor = iColor
End With
End If
ci-joint dernière version : http://cjoint.com/?ftkxgDxgCJ
Bonjour jean-Paul; Essaie avec celui-ci: http://cjoint.com/?ftnMbaoZXs Si tu as un souci, contacte moi en bal perso.
MP
"Jean-Paul V" a écrit dans le message de news:
Bonjour à tous Je suis toujours sur le fichier de Serge Garneau modifié Michel Pierron
J'ai un module de classe dans lequel une macro examine différent cas pour modifier les couleurs de la série 1 et 2
1 )Première version qui essaie de traiter le cas des courbes cette macro fonctionne bien : Case 8 'Traite le cas des courbes If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "Line", 1) Then With .ChartObjects("graphe").Chart.SeriesCollection(1).Border .ColorIndex = iColor .Weight = xlMedium .LineStyle = xlContinuous End With With .ChartObjects("graphe").Chart.SeriesCollection(1) .MarkerBackgroundColorIndex = xlNone .MarkerForegroundColorIndex = xlNone .MarkerStyle = xlNone .Smooth = False .MarkerSize = 5 .Shadow = False End With 'N'est pas une courbe Else With .ChartObjects("graphe").Chart.SeriesCollection(1) .Border.Weight = 1 .Border.LineStyle = -1 .Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4, Degree:=0.231372549019608 .Fill.Visible = True .Fill.ForeColor.SchemeColor = iColor End With End If
2 ) Deuxième version qui essaie de traiter le cas des nuages de points cette macro fonctionne bien : Case 8 'Traite le cas Nuage de points non reliés If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "4169", 1) Then With .ChartObjects("graphe").Chart.SeriesCollection(1).Border .Weight = xlHairline .LineStyle = xlNone End With With .ChartObjects("graphe").Chart.SeriesCollection(1) .MarkerBackgroundColorIndex = iColor .MarkerForegroundColorIndex = iColor .MarkerStyle = xlDiamond .Smooth = False .MarkerSize = 5 .Shadow = False End With Else With .ChartObjects("graphe").Chart.SeriesCollection(1) .Border.Weight = 1 .Border.LineStyle = -1 .Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4, Degree:=0.231372549019608 .Fill.Visible = True .Fill.ForeColor.SchemeColor = iColor End With End If
3 ) Troisième version qui veut traiter les courbe et nuages de points ne marche plus pour les courbes où est l'erreur ? Case 8 'Pouquoi ce qui suit ne marche plus pour les courbes ? If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "Line", 1) Then With .ChartObjects("graphe").Chart.SeriesCollection(1).Border .ColorIndex = iColor .Weight = xlMedium .LineStyle = xlContinuous End With With .ChartObjects("graphe").Chart.SeriesCollection(1) .MarkerBackgroundColorIndex = xlNone .MarkerForegroundColorIndex = xlNone .MarkerStyle = xlNone .Smooth = False .MarkerSize = 5 .Shadow = False End With End If 'Ce qui suit fonctionne If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "4169", 1) Then With .ChartObjects("graphe").Chart.SeriesCollection(1).Border .Weight = xlHairline .LineStyle = xlNone End With With .ChartObjects("graphe").Chart.SeriesCollection(1) .MarkerBackgroundColorIndex = iColor .MarkerForegroundColorIndex = iColor .MarkerStyle = xlDiamond .Smooth = False .MarkerSize = 5 .Shadow = False End WithElse With .ChartObjects("graphe").Chart.SeriesCollection(1) .Border.Weight = 1 .Border.LineStyle = -1 .Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4, Degree:=0.231372549019608 .Fill.Visible = True .Fill.ForeColor.SchemeColor = iColor End With End If
ci-joint dernière version : http://cjoint.com/?ftkxgDxgCJ
Merci à ceux qui peuvent m'aider je suis en panne
Jean-Paul V
Bonjour Michel
C'est mieux mais pas encore bon car l'option Nuage se transforme en Nuage et courbe. Mais comme j'avais oublié Else If et or je vais explorer et essayer de trouver. a+
Bonjour jean-Paul; Essaie avec celui-ci: http://cjoint.com/?ftnMbaoZXs Si tu as un souci, contacte moi en bal perso.
MP
"Jean-Paul V" a écrit dans le message de news:
Bonjour à tous Je suis toujours sur le fichier de Serge Garneau modifié Michel Pierron
J'ai un module de classe dans lequel une macro examine différent cas pour modifier les couleurs de la série 1 et 2
1 )Première version qui essaie de traiter le cas des courbes cette macro fonctionne bien : Case 8 'Traite le cas des courbes If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "Line", 1) Then With .ChartObjects("graphe").Chart.SeriesCollection(1).Border .ColorIndex = iColor .Weight = xlMedium .LineStyle = xlContinuous End With With .ChartObjects("graphe").Chart.SeriesCollection(1) .MarkerBackgroundColorIndex = xlNone .MarkerForegroundColorIndex = xlNone .MarkerStyle = xlNone .Smooth = False .MarkerSize = 5 .Shadow = False End With 'N'est pas une courbe Else With .ChartObjects("graphe").Chart.SeriesCollection(1) .Border.Weight = 1 .Border.LineStyle = -1 .Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4, Degree:=0.231372549019608 .Fill.Visible = True .Fill.ForeColor.SchemeColor = iColor End With End If
2 ) Deuxième version qui essaie de traiter le cas des nuages de points cette macro fonctionne bien : Case 8 'Traite le cas Nuage de points non reliés If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "4169", 1) Then With .ChartObjects("graphe").Chart.SeriesCollection(1).Border .Weight = xlHairline .LineStyle = xlNone End With With .ChartObjects("graphe").Chart.SeriesCollection(1) .MarkerBackgroundColorIndex = iColor .MarkerForegroundColorIndex = iColor .MarkerStyle = xlDiamond .Smooth = False .MarkerSize = 5 .Shadow = False End With Else With .ChartObjects("graphe").Chart.SeriesCollection(1) .Border.Weight = 1 .Border.LineStyle = -1 .Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4, Degree:=0.231372549019608 .Fill.Visible = True .Fill.ForeColor.SchemeColor = iColor End With End If
3 ) Troisième version qui veut traiter les courbe et nuages de points ne marche plus pour les courbes où est l'erreur ? Case 8 'Pouquoi ce qui suit ne marche plus pour les courbes ? If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "Line", 1) Then With .ChartObjects("graphe").Chart.SeriesCollection(1).Border .ColorIndex = iColor .Weight = xlMedium .LineStyle = xlContinuous End With With .ChartObjects("graphe").Chart.SeriesCollection(1) .MarkerBackgroundColorIndex = xlNone .MarkerForegroundColorIndex = xlNone .MarkerStyle = xlNone .Smooth = False .MarkerSize = 5 .Shadow = False End With End If 'Ce qui suit fonctionne If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "4169", 1) Then With .ChartObjects("graphe").Chart.SeriesCollection(1).Border .Weight = xlHairline .LineStyle = xlNone End With With .ChartObjects("graphe").Chart.SeriesCollection(1) .MarkerBackgroundColorIndex = iColor .MarkerForegroundColorIndex = iColor .MarkerStyle = xlDiamond .Smooth = False .MarkerSize = 5 .Shadow = False End WithElse With .ChartObjects("graphe").Chart.SeriesCollection(1) .Border.Weight = 1 .Border.LineStyle = -1 .Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4, Degree:=0.231372549019608 .Fill.Visible = True .Fill.ForeColor.SchemeColor = iColor End With End If
ci-joint dernière version : http://cjoint.com/?ftkxgDxgCJ
Merci à ceux qui peuvent m'aider je suis en panne
Bonjour Michel
C'est mieux mais pas encore bon car l'option Nuage se transforme en Nuage et
courbe.
Mais comme j'avais oublié Else If et or je vais explorer et essayer de
trouver.
a+
Bonjour jean-Paul;
Essaie avec celui-ci:
http://cjoint.com/?ftnMbaoZXs
Si tu as un souci, contacte moi en bal perso.
MP
"Jean-Paul V" <JeanPaulV@discussions.microsoft.com> a écrit dans le message
de news: 501EEA07-920C-4F96-8369-57692A4E95BD@microsoft.com...
Bonjour à tous
Je suis toujours sur le fichier de Serge Garneau modifié Michel Pierron
J'ai un module de classe dans lequel une macro examine différent cas pour
modifier les couleurs de la série 1 et 2
1 )Première version qui essaie de traiter le cas des courbes cette macro
fonctionne bien :
Case 8
'Traite le cas des courbes
If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "Line", 1) Then
With .ChartObjects("graphe").Chart.SeriesCollection(1).Border
.ColorIndex = iColor
.Weight = xlMedium
.LineStyle = xlContinuous
End With
With .ChartObjects("graphe").Chart.SeriesCollection(1)
.MarkerBackgroundColorIndex = xlNone
.MarkerForegroundColorIndex = xlNone
.MarkerStyle = xlNone
.Smooth = False
.MarkerSize = 5
.Shadow = False
End With
'N'est pas une courbe
Else
With .ChartObjects("graphe").Chart.SeriesCollection(1)
.Border.Weight = 1
.Border.LineStyle = -1
.Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4,
Degree:=0.231372549019608
.Fill.Visible = True
.Fill.ForeColor.SchemeColor = iColor
End With
End If
2 ) Deuxième version qui essaie de traiter le cas des nuages de points
cette
macro fonctionne bien :
Case 8
'Traite le cas Nuage de points non reliés
If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "4169", 1) Then
With .ChartObjects("graphe").Chart.SeriesCollection(1).Border
.Weight = xlHairline
.LineStyle = xlNone
End With
With .ChartObjects("graphe").Chart.SeriesCollection(1)
.MarkerBackgroundColorIndex = iColor
.MarkerForegroundColorIndex = iColor
.MarkerStyle = xlDiamond
.Smooth = False
.MarkerSize = 5
.Shadow = False
End With
Else
With .ChartObjects("graphe").Chart.SeriesCollection(1)
.Border.Weight = 1
.Border.LineStyle = -1
.Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4,
Degree:=0.231372549019608
.Fill.Visible = True
.Fill.ForeColor.SchemeColor = iColor
End With
End If
3 ) Troisième version qui veut traiter les courbe et nuages de points ne
marche plus pour les courbes où est l'erreur ?
Case 8
'Pouquoi ce qui suit ne marche plus pour les courbes ?
If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "Line", 1) Then
With .ChartObjects("graphe").Chart.SeriesCollection(1).Border
.ColorIndex = iColor
.Weight = xlMedium
.LineStyle = xlContinuous
End With
With .ChartObjects("graphe").Chart.SeriesCollection(1)
.MarkerBackgroundColorIndex = xlNone
.MarkerForegroundColorIndex = xlNone
.MarkerStyle = xlNone
.Smooth = False
.MarkerSize = 5
.Shadow = False
End With
End If
'Ce qui suit fonctionne
If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "4169", 1) Then
With .ChartObjects("graphe").Chart.SeriesCollection(1).Border
.Weight = xlHairline
.LineStyle = xlNone
End With
With .ChartObjects("graphe").Chart.SeriesCollection(1)
.MarkerBackgroundColorIndex = iColor
.MarkerForegroundColorIndex = iColor
.MarkerStyle = xlDiamond
.Smooth = False
.MarkerSize = 5
.Shadow = False
End WithElse
With .ChartObjects("graphe").Chart.SeriesCollection(1)
.Border.Weight = 1
.Border.LineStyle = -1
.Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4,
Degree:=0.231372549019608
.Fill.Visible = True
.Fill.ForeColor.SchemeColor = iColor
End With
End If
ci-joint dernière version : http://cjoint.com/?ftkxgDxgCJ
C'est mieux mais pas encore bon car l'option Nuage se transforme en Nuage et courbe. Mais comme j'avais oublié Else If et or je vais explorer et essayer de trouver. a+
Bonjour jean-Paul; Essaie avec celui-ci: http://cjoint.com/?ftnMbaoZXs Si tu as un souci, contacte moi en bal perso.
MP
"Jean-Paul V" a écrit dans le message de news:
Bonjour à tous Je suis toujours sur le fichier de Serge Garneau modifié Michel Pierron
J'ai un module de classe dans lequel une macro examine différent cas pour modifier les couleurs de la série 1 et 2
1 )Première version qui essaie de traiter le cas des courbes cette macro fonctionne bien : Case 8 'Traite le cas des courbes If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "Line", 1) Then With .ChartObjects("graphe").Chart.SeriesCollection(1).Border .ColorIndex = iColor .Weight = xlMedium .LineStyle = xlContinuous End With With .ChartObjects("graphe").Chart.SeriesCollection(1) .MarkerBackgroundColorIndex = xlNone .MarkerForegroundColorIndex = xlNone .MarkerStyle = xlNone .Smooth = False .MarkerSize = 5 .Shadow = False End With 'N'est pas une courbe Else With .ChartObjects("graphe").Chart.SeriesCollection(1) .Border.Weight = 1 .Border.LineStyle = -1 .Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4, Degree:=0.231372549019608 .Fill.Visible = True .Fill.ForeColor.SchemeColor = iColor End With End If
2 ) Deuxième version qui essaie de traiter le cas des nuages de points cette macro fonctionne bien : Case 8 'Traite le cas Nuage de points non reliés If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "4169", 1) Then With .ChartObjects("graphe").Chart.SeriesCollection(1).Border .Weight = xlHairline .LineStyle = xlNone End With With .ChartObjects("graphe").Chart.SeriesCollection(1) .MarkerBackgroundColorIndex = iColor .MarkerForegroundColorIndex = iColor .MarkerStyle = xlDiamond .Smooth = False .MarkerSize = 5 .Shadow = False End With Else With .ChartObjects("graphe").Chart.SeriesCollection(1) .Border.Weight = 1 .Border.LineStyle = -1 .Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4, Degree:=0.231372549019608 .Fill.Visible = True .Fill.ForeColor.SchemeColor = iColor End With End If
3 ) Troisième version qui veut traiter les courbe et nuages de points ne marche plus pour les courbes où est l'erreur ? Case 8 'Pouquoi ce qui suit ne marche plus pour les courbes ? If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "Line", 1) Then With .ChartObjects("graphe").Chart.SeriesCollection(1).Border .ColorIndex = iColor .Weight = xlMedium .LineStyle = xlContinuous End With With .ChartObjects("graphe").Chart.SeriesCollection(1) .MarkerBackgroundColorIndex = xlNone .MarkerForegroundColorIndex = xlNone .MarkerStyle = xlNone .Smooth = False .MarkerSize = 5 .Shadow = False End With End If 'Ce qui suit fonctionne If InStr(1, .ChartObjects("graphe").Chart.ChartTitle.Text, "4169", 1) Then With .ChartObjects("graphe").Chart.SeriesCollection(1).Border .Weight = xlHairline .LineStyle = xlNone End With With .ChartObjects("graphe").Chart.SeriesCollection(1) .MarkerBackgroundColorIndex = iColor .MarkerForegroundColorIndex = iColor .MarkerStyle = xlDiamond .Smooth = False .MarkerSize = 5 .Shadow = False End WithElse With .ChartObjects("graphe").Chart.SeriesCollection(1) .Border.Weight = 1 .Border.LineStyle = -1 .Fill.OneColorGradient Style:=msoGradientVertical, Variant:=4, Degree:=0.231372549019608 .Fill.Visible = True .Fill.ForeColor.SchemeColor = iColor End With End If
ci-joint dernière version : http://cjoint.com/?ftkxgDxgCJ