LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default chart works in excel 2007, not 2003

The following code works fine in 2007. In 2003, I get error "1004 -
Unable to set the XValue property of the Series class" on the line
with the asterisk (*). If I move the line " chartpoint.ChartType =
xlLineMarkers" to after the line with the asterisk, it works fine
until it gets to the next line. I have been rearranging lines, but
have not found any arrangement that works with 2003. Any ideas?


newchart.Chart.SetSourceData Source:=.Range(.Cells(irow + 1,
1), .Cells(irow + 4, 61)) _
, PlotBy:=xlRows
Set chartpoint = newchart.Chart

chartpoint.HasLegend = False
chartpoint.HasDataTable = True
chartpoint.DataTable.ShowLegendKey = True
chartpoint.ChartType = xlLineMarkers
chartpoint.HasTitle = True
chartpoint.ChartTitle.Text = tpms(itask, itpm)
chartpoint.Axes(xlCategory, xlPrimary).HasTitle = False
chartpoint.Axes(xlValue, xlPrimary).HasTitle = True
chartpoint.Axes(xlValue).AxisTitle.Text = units(itask, itpm)

* chartpoint.SeriesCollection(1).XValues = .Range("b6:bi6")
chartpoint.SeriesCollection(1).Format.Line.Visible = False
chartpoint.SeriesCollection(1).Border.LineStyle = xlNone
chartpoint.SeriesCollection(1).MarkerBackgroundCol orIndex = 3
chartpoint.SeriesCollection(1).MarkerForegroundCol orIndex = 3
chartpoint.SeriesCollection(1).MarkerStyle = xlDiamond
chartpoint.SeriesCollection(1).Smooth = False
chartpoint.SeriesCollection(1).MarkerSize = 5
chartpoint.SeriesCollection(1).Shadow = False

chartpoint.SeriesCollection(2).XValues = .Range("b6:bi6")
chartpoint.SeriesCollection(2).Format.Line.Visible = False
chartpoint.SeriesCollection(2).Border.LineStyle = xlNone
chartpoint.SeriesCollection(2).MarkerBackgroundCol orIndex = 5
chartpoint.SeriesCollection(2).MarkerForegroundCol orIndex = 5
chartpoint.SeriesCollection(2).MarkerStyle = xlSquare
chartpoint.SeriesCollection(2).Smooth = False
chartpoint.SeriesCollection(2).MarkerSize = 5
chartpoint.SeriesCollection(2).Shadow = False

chartpoint.SeriesCollection(3).XValues = .Range("b6:bi6")
chartpoint.SeriesCollection(3).Border.ColorIndex = 4
chartpoint.SeriesCollection(3).Border.Weight = xlThick
chartpoint.SeriesCollection(3).Border.LineStyle = xlContinuous
chartpoint.SeriesCollection(3).MarkerStyle = xlNone
chartpoint.SeriesCollection(3).Smooth = False
chartpoint.SeriesCollection(3).Shadow = False

chartpoint.SeriesCollection(4).XValues = .Range("b6:bi6")
chartpoint.SeriesCollection(4).Border.ColorIndex = 6
chartpoint.SeriesCollection(4).Border.Weight = xlThick
chartpoint.SeriesCollection(4).Border.LineStyle = xlContinuous
chartpoint.SeriesCollection(4).MarkerStyle = xlNone
chartpoint.SeriesCollection(4).Smooth = False
chartpoint.SeriesCollection(4).MarkerSize = 5
chartpoint.SeriesCollection(4).Shadow = False

chartpoint.PlotArea.Interior.Color = vbWhite

chartpoint.PlotArea.Border.ColorIndex = 2
chartpoint.PlotArea.Border.Weight = xlThin
chartpoint.PlotArea.Border.LineStyle = xlContinuous

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SUMIF formula works in Excel 2003, does not work in Excel 2007 Harry Excel Discussion (Misc queries) 3 April 24th 09 02:33 PM
function =IFERROR LOOKUP works in excel 2007 not in excel 2003 David Ryan Excel Worksheet Functions 4 April 15th 09 03:25 PM
Works in 2007 but not 2003 teepee[_3_] Excel Discussion (Misc queries) 9 November 25th 08 08:53 AM
xls file works fine in Excel 2000 and 2007 but crashes on opening in 2003 gromit12 Excel Discussion (Misc queries) 2 November 6th 07 09:30 PM
sortTable works in 2003 but not in 2007 Marcello Excel Programming 4 March 6th 07 12:24 PM


All times are GMT +1. The time now is 01:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"