Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to create a chart based on the fields selected in the
worksheet. The chart loads fine, but I am getting this error: Runtime error 1004 Method 'SetSourceData' of Object '_Chart' failed Here's the Macro: Sub Macro1() Charts.Add ActiveChart.ApplyCustomType ChartType:=xlUserDefined, TypeName:="PMS" ----Line I get error on: ActiveChart.SetSourceData Source:=Application.ActiveWindow.ActiveCell, PlotBy:= _ xlColumns ActiveChart.Location Whe=xlLocationAsNewSheet With ActiveChart .HasTitle = True .ChartTitle.Characters.Text = = "Title" .Axes(xlCategory, xlPrimary).HasTitle = True .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = = "Month" .Axes(xlValue, xlPrimary).HasTitle = True .Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Data = " End With End Sub Does anyone have any idea why I'm getting this error? This is in Excel 2003. Thank you in advance! Jill |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Create a Chart using a Macro | Charts and Charting in Excel | |||
Macro to create a new chart | Charts and Charting in Excel | |||
VB Macro to Create a Chart | Excel Discussion (Misc queries) | |||
Setting up Macro to create pie chart. | Charts and Charting in Excel | |||
macro to create a chart | Excel Programming |