View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Debra Dalgleish Debra Dalgleish is offline
external usenet poster
 
Posts: 2,979
Default Problems creating "line and bar chart"

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 Whe=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 Whe=xlLocationAsObject, Name:="Sheet1"
ActiveChart.ApplyCustomType ChartType:=xlBuiltIn, _
TypeName:="Line - Column"


Ariel wrote:
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 !



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html