Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I turned on the macro recorder and created a "Line on 2 Axes" chart.
The recorded macro is given below. I ran the recorded macro but I got a different output (I think the output was a column chart instead of "Line on 2 Axes" chart) Why is it so? Usually macro-recorder's code works perfect. Should I need to turn-on any references or add-ins? Someone who has a solution for this, please clarify. Thanks Sub Macro1() Charts.Add ActiveChart.ApplyCustomType ChartType:=xlBuiltIn, TypeName:= _ "Lines on 2 Axes" ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("A:A,C:C,D:D"), _ PlotBy:=xlColumns ActiveChart.Location Whe=xlLocationAsObject, Name:="Sheet1" With ActiveChart .HasTitle = False .Axes(xlCategory, xlPrimary).HasTitle = False .Axes(xlValue, xlPrimary).HasTitle = False .Axes(xlCategory, xlSecondary).HasTitle = False .Axes(xlValue, xlSecondary).HasTitle = False End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 error "some chart types cannot be combined with other chart types. Select a different chart types" | Charts and Charting in Excel | |||
Excel 2003 is missing Built-In Custom Chart Types in Chart Wizard | Charts and Charting in Excel | |||
Excel 2003 is missing Built-In Custom Chart Types in Chart Wizard | Setting up and Configuration of Excel | |||
built-in custom chart types | Excel Discussion (Misc queries) | |||
When code runs...worksheet acts a little strange | Excel Programming |