A voir également:
- Probleme dans graphique dynamique et mise en forme
- Mise en forme conditionnelle excel - Guide
- Tableau croisé dynamique - Guide
- Changer carte graphique - Guide
- Mise a jour chrome - Accueil - Applications & Logiciels
- Liste déroulante dynamique excel - Guide
1 réponse
J'ai trouve une parade en colorant au lieu de supprimer et en rendant le graphique encore plus joli :-)
mais je ne comprends toujours pas pourquoi le fait de supprimer les bordures ne marche pas :-(
voila mon code:
mais je ne comprends toujours pas pourquoi le fait de supprimer les bordures ne marche pas :-(
voila mon code:
Public Function CCCchart(nllplage As Range) 'dynamisation de la plage de donnee Dim xater As Integer, xbter As Integer, xcter As Integer, var2ter As String, plagefinaleCCC As Range xater = 0 xbter = 1 Do If Worksheets("Asia Pacific WC Broken Details").Cells(3, xbter) = nllplage.Value And Worksheets("Asia Pacific WC Broken Details").Cells(4, xbter) = Worksheets("Sheet3").Cells(7, 4) Then xater = xbter Else xbter = xbter + 1 End If Loop While xater = 0 var2ter = Worksheets("Sheet3").Range("D6") For i = 0 To 11 Select Case var2ter Case Is = Worksheets("Sheet3").Cells(i + 1, 2).Value xcter = i End Select Next i Set plagefinaleCCC = Range(Worksheets("Asia Pacific WC Broken Details").Cells(105, xater), Worksheets("Asia Pacific WC Broken Details").Cells(105, xater + xcter)) ThisWorkbook.Names.Add Name:="plgref3", RefersTo:=plagefinaleCCC 'coloration au lieu de suppression With Range(Cells(18, 18), Cells(20, 21)) With .Borders(xlEdgeLeft) .LineStyle = xlContinuous .ThemeColor = 1 .TintAndShade = 0 .Weight = xlThin End With With .Borders(xlEdgeTop) .LineStyle = xlContinuous .ThemeColor = 1 .TintAndShade = 0 .Weight = xlThin End With With .Borders(xlEdgeRight) .LineStyle = xlContinuous .ThemeColor = 1 .TintAndShade = 0 .Weight = xlThin End With With .Borders(xlEdgeBottom) .LineStyle = xlContinuous .Color = -395791 .TintAndShade = 0 .Weight = xlThin End With With .Borders(xlInsideVertical) .LineStyle = xlContinuous .ThemeColor = 1 .TintAndShade = 0 .Weight = xlThin End With End With 'rajout des coloration pour les "onglets" du graph non actifs par rapport a l'ancien code Select Case nllplage Case Is = Cells(19, 18) Range(Cells(18, 18), Cells(20, 18)).Interior.Color = RGB(241, 245, 249) Range(Cells(18, 19), Cells(18, 21)).Interior.Color = RGB(255, 255, 255) Range(Cells(19, 19), Cells(19, 21)).Interior.Color = RGB(242, 242, 242) With Range(Cells(18, 18), Cells(20, 18)).Borders(xlEdgeLeft) .LineStyle = xlContinuous .ThemeColor = 5 .TintAndShade = -0.249946592608417 .Weight = xlThin End With With Range(Cells(18, 18), Cells(20, 18)).Borders(xlEdgeTop) .LineStyle = xlContinuous .ThemeColor = 5 .TintAndShade = -0.249946592608417 .Weight = xlThin End With Selection.Borders(xlEdgeBottom).LineStyle = xlNone With Range(Cells(18, 18), Cells(20, 18)).Borders(xlEdgeRight) .LineStyle = xlContinuous .ThemeColor = 5 .TintAndShade = -0.249946592608417 .Weight = xlThin End With With Range(Cells(20, 19), Cells(20, 21)).Borders(xlEdgeBottom) .LineStyle = xlContinuous .ThemeColor = 5 .TintAndShade = -0.249946592608417 .Weight = xlThin End With Range(Cells(18, 19), Cells(20, 21)).Borders(xlEdgeTop).LineStyle = xlNone Case Is = Cells(19, 19) Range(Cells(18, 19), Cells(20, 19)).Interior.Color = RGB(241, 245, 249) Range(Cells(18, 18), Cells(18, 18)).Interior.Color = RGB(255, 255, 255) Range(Cells(18, 20), Cells(18, 21)).Interior.Color = RGB(255, 255, 255) Range(Cells(19, 18), Cells(20, 18)).Interior.Color = RGB(242, 242, 242) Range(Cells(19, 20), Cells(20, 21)).Interior.Color = RGB(242, 242, 242) With Range(Cells(18, 19), Cells(20, 19)).Borders(xlEdgeLeft) .LineStyle = xlContinuous .ThemeColor = 5 .TintAndShade = -0.249946592608417 .Weight = xlThin End With With Range(Cells(18, 19), Cells(20, 19)).Borders(xlEdgeTop) .LineStyle = xlContinuous .ThemeColor = 5 .TintAndShade = -0.249946592608417 .Weight = xlThin End With Selection.Borders(xlEdgeBottom).LineStyle = xlNone With Range(Cells(18, 19), Cells(20, 19)).Borders(xlEdgeRight) .LineStyle = xlContinuous .ThemeColor = 5 .TintAndShade = -0.249946592608417 .Weight = xlThin End With With Range(Cells(20, 18), Cells(20, 18)).Borders(xlEdgeBottom) .LineStyle = xlContinuous .ThemeColor = 5 .TintAndShade = -0.249946592608417 .Weight = xlThin End With With Range(Cells(20, 20), Cells(20, 21)).Borders(xlEdgeBottom) .LineStyle = xlContinuous .ThemeColor = 5 .TintAndShade = -0.249946592608417 .Weight = xlThin End With Case Is = Cells(19, 20) Range(Cells(18, 20), Cells(20, 20)).Interior.Color = RGB(241, 245, 249) Range(Cells(18, 18), Cells(18, 19)).Interior.Color = RGB(255, 255, 255) Range(Cells(18, 21), Cells(18, 21)).Interior.Color = RGB(255, 255, 255) Range(Cells(19, 18), Cells(20, 19)).Interior.Color = RGB(242, 242, 242) Range(Cells(19, 21), Cells(20, 21)).Interior.Color = RGB(242, 242, 242) With Range(Cells(18, 20), Cells(20, 20)).Borders(xlEdgeLeft) .LineStyle = xlContinuous .ThemeColor = 5 .TintAndShade = -0.249946592608417 .Weight = xlThin End With With Range(Cells(18, 20), Cells(20, 20)).Borders(xlEdgeTop) .LineStyle = xlContinuous .ThemeColor = 5 .TintAndShade = -0.249946592608417 .Weight = xlThin End With Selection.Borders(xlEdgeBottom).LineStyle = xlNone With Range(Cells(18, 20), Cells(20, 20)).Borders(xlEdgeRight) .LineStyle = xlContinuous .ThemeColor = 5 .TintAndShade = -0.249946592608417 .Weight = xlThin End With With Range(Cells(20, 18), Cells(20, 19)).Borders(xlEdgeBottom) .LineStyle = xlContinuous .ThemeColor = 5 .TintAndShade = -0.249946592608417 .Weight = xlThin End With With Range(Cells(20, 21), Cells(20, 21)).Borders(xlEdgeBottom) .LineStyle = xlContinuous .ThemeColor = 5 .TintAndShade = -0.249946592608417 .Weight = xlThin End With Case Is = Cells(19, 21) Range(Cells(18, 21), Cells(20, 21)).Interior.Color = RGB(241, 245, 249) Range(Cells(18, 18), Cells(18, 20)).Interior.Color = RGB(255, 255, 255) Range(Cells(19, 18), Cells(20, 20)).Interior.Color = RGB(242, 242, 242) With Range(Cells(18, 21), Cells(20, 21)).Borders(xlEdgeLeft) .LineStyle = xlContinuous .ThemeColor = 5 .TintAndShade = -0.249946592608417 .Weight = xlThin End With With Range(Cells(18, 21), Cells(20, 21)).Borders(xlEdgeTop) .LineStyle = xlContinuous .ThemeColor = 5 .TintAndShade = -0.249946592608417 .Weight = xlThin End With Selection.Borders(xlEdgeBottom).LineStyle = xlNone With Range(Cells(18, 21), Cells(20, 21)).Borders(xlEdgeRight) .LineStyle = xlContinuous .ThemeColor = 5 .TintAndShade = -0.249946592608417 .Weight = xlThin End With With Range(Cells(20, 18), Cells(20, 20)).Borders(xlEdgeBottom) .LineStyle = xlContinuous .ThemeColor = 5 .TintAndShade = -0.249946592608417 .Weight = xlThin End With End Select End Function