Problems creating "line and bar chart"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

when recording the macro, I didn't have problems creating the two series, one a bar, and the second a line. However, upon running the macro, both series appear as bars! I retried recording the macro and the same problem occurred

Please email me at (e-mail address removed)!
 
When you look at the code that was recorded, it should look similar to this:

ActiveChart.ApplyCustomType ChartType:=xlBuiltIn, _
TypeName:="Line - Column"
ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("A1:G3")
ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet1"

Rearrage these lines, so the chart type is applied after the source data
and location are set:

ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("A1:G3")
ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet1"
ActiveChart.ApplyCustomType ChartType:=xlBuiltIn, _
TypeName:="Line - Column"
 
Back
Top