Hi all,
I recorded a macro to add a chart, and altered the code shown as follows:
Sub newChart()
charts.Add
ActiveChart.Location Where:=xlLocationAsObject, Name:="User Preferences"
With ActiveChart
.SetSourceData Source:=Sheets("User Preferences").Range("A12").CurrentRegion, PlotBy:=xlColumns
.HasTitle = True
.ChartType = xlColumnClustered
.ChartTitle.Characters.Text = "Interactive Chart Analysis"
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Countries"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Rating"
End With
End Sub
however, while 'Call newChart', error message shows method 'Add' is not found.
i've checked books and online information, but still couldn't solve it. can anyone help please?![]()
Thanks
Fendic
Bookmarks