Je vous mets la macro en entier.
Je ne sais pas programmer donc ne vous moquez pas de moi. Vous allez y voir surement des trucs bizarres mais elle est toute proche de fonctionner.
QQun peut me dire quoi ajouter?
Private Sub CommandButton1_Click()
nom = ComboBox4.Value
Feuil1.Select
Range("7:7").Find(nom, , xlValues, xlWhole, , , False).Select
ActiveCell.Select
Colonne = ActiveCell.Column
Ligne = ActiveCell.Row
Feuil1.Range(Cells(Ligne + 3, Colonne), Cells(Ligne + 1949, Colonne)).Select
Sheets(ComboBox4.Value).Select
Dim wsData As Worksheet, wsChart As Worksheet
Dim rngChart As Range
Dim objChart As ChartObject
Dim objLE As LegendEntry
ActiveSheet.unprotect Password:="toto"
Application.ScreenUpdating = False
Set wsData = Feuil1
Set wsChart = ActiveSheet
On Error Resume Next
wsChart.ChartObjects(1).Delete
On Error GoTo 0
Set objChart = wsChart.ChartObjects.Add _
(Left:=wsChart.Columns("c").Left, _
Top:=wsChart.Rows(9).Top, _
Width:=800, _
Height:=280)
With objChart.Chart
.ChartType = xlColumnClustered
.SetSourceData Source:=??????????????????????????????????????????????????????????????????????
.HasTitle = True
.ChartTitle.Text = ComboBox3.Value & " - " & ComboBox4.Value
.HasLegend = False
End With
Unload Me
Set objChart = Nothing
Set rngChart = Nothing
Set wsChart = Nothing: Set wsData = Nothing
ActiveSheet.protect Password:="toto", DrawingObjects:=False, Contents:=True, Scenarios:=True
End Sub