Création graph sous vba avec fonction Range
Bonjour,
je tente de créer un graph avec ma macro mais cela plante au niveau de la ligne de code " Range("E1:G31,A1:A31").Select". J'ai l'impression que Excel/VBA ne parvient pas à sélectionner le range définit.
Qq'un aurait il une idée ?
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Rows("2:2").Select
ActiveWindow.SmallScroll Down:=18
Rows("2:35").Select
Selection.Delete Shift:=xlUp
ActiveWindow.SmallScroll Down:=-9
Range("E1:G31,A1:A31").Select
Range("A31").Activate
Charts.Add
ActiveChart.ApplyCustomType ChartType:=xlUserDefined, TypeName:="Graph_WOH"
ActiveChart.SetSourceData Source:=Sheets("Feuil2").Range("A1:A31,E1:G31"), _
PlotBy:=xlColumns
ActiveChart.Location Where:=xlLocationAsNewSheet
With ActiveChart
.HasTitle = False
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = False
End With |
Merci d'avance