Attribute VB_Name = "ModDASHBOARD12" Option Explicit Public Sub ConstruireDashboardIDR() Dim wsDash As Worksheet Dim wsKPI As Worksheet Set wsDash = ResetSheetIDR("DASHBOARD_IDR") Set wsKPI = Worksheets("KPI_HYPOTHESES_IDR") With wsDash .Range("A1").value = _ "DASHBOARD PROVISIONS IDR / IFC" .Range("A1").Font.Size = 18 .Range("A1").Font.Bold = True .Range("A3").value = "Indicateur" .Range("B3").value = "Valeur" .Range("A4").value = wsKPI.Cells(2, 1).value .Range("B4").value = wsKPI.Cells(2, 2).value .Range("A5").value = wsKPI.Cells(3, 1).value .Range("B5").value = wsKPI.Cells(3, 2).value .Range("A6").value = wsKPI.Cells(4, 1).value .Range("B6").value = wsKPI.Cells(4, 2).value .Range("A7").value = wsKPI.Cells(5, 1).value .Range("B7").value = wsKPI.Cells(5, 2).value .Range("A8").value = wsKPI.Cells(6, 1).value .Range("B8").value = wsKPI.Cells(6, 2).value .Range("A9").value = wsKPI.Cells(7, 1).value .Range("B9").value = wsKPI.Cells(7, 2).value .Range("A10").value = wsKPI.Cells(8, 1).value .Range("B10").value = wsKPI.Cells(8, 2).value .Range("A11").value = wsKPI.Cells(9, 1).value .Range("B11").value = wsKPI.Cells(9, 2).value End With With wsDash.Range("A3:B11") .Borders.LineStyle = xlContinuous End With With wsDash.Range("A3:B3") .Font.Bold = True .Interior.Color = RGB(31, 78, 121) .Font.Color = RGB(255, 255, 255) End With wsDash.Columns.AutoFit CreerGraphiqueRepartitionHF wsDash MsgBox "Dashboard IDR construit.", vbInformation End Sub Private Sub CreerGraphiqueRepartitionHF( _ ByVal wsDash As Worksheet) Dim ch As ChartObject On Error Resume Next For Each ch In wsDash.ChartObjects ch.Delete Next ch On Error GoTo 0 Set ch = wsDash.ChartObjects.Add( _ Left:=350, _ Top:=50, _ Width:=400, _ Height:=250) With ch.Chart .ChartType = xlPie .SetSourceData _ Source:=wsDash.Range("A10:B11") .HasTitle = True .ChartTitle.Text = _ "R partition Hommes / Femmes" End With End Sub