Results 1 to 3 of 3

Set XValues for Series Class (Chart)

Threaded View

danny2000 Set XValues for Series Class... 02-05-2010, 08:24 PM
shg Re: Set XValues for Series... 02-05-2010, 08:56 PM
danny2000 Re: Set XValues for Series... 02-05-2010, 11:01 PM
  1. #1
    Forum Contributor
    Join Date
    09-23-2007
    Location
    Melbourne, Australia
    Posts
    176

    Set XValues for Series Class (Chart)

    I'm getting an error when I try to set the XValues for a chart in my excel worksheet.
    The chart shows up fine and the new series adds fine though when I try to set the XValues the below error occurs

    'Unable to set the Xvalues property of the Series Class' 1004

    My Code is below. Can anyone see anything wrong with it? This could be a floor in my understanding of the chart object. I don't want to be selecting charts and working on an activechart because I'll have several in the one worksheet.


    Dim Chart1 As Chart
    
    Set Chart1 = charts.Add
       '
       Set Chart1 = Chart1.Location(Where:=xlLocationAsObject, Name:="Sheet1")
       
       With Chart1 
          .ChartType = xlLine
       End With
         ' 
    
          'works correctly
          Chart1.SeriesCollection.NewSeries
    
      'I get the error when reaching the line below
        
       Chart1.SeriesCollection(1).XValues = "=Sheet2!R334C27:R334C31"
    Last edited by shg; 02-06-2010 at 01:25 AM. Reason: delete quote tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1