Results 1 to 2 of 2

Help Needed to remove version dependency

Threaded View

amazon Help Needed to remove version... 05-25-2009, 06:28 AM
royUK Re: Help Needed to remove... 05-25-2009, 06:53 AM
  1. #1
    Registered User
    Join Date
    05-25-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    1

    Post Help Needed to remove version dependency

    Hi All,

    I have recorded a macro to generate some graphs in excel 2003. The code snippet is as follows:
    Charts.Add
        ActiveChart.ChartType = xlLineMarkers
        ActiveChart.SeriesCollection.NewSeries
        ActiveChart.SeriesCollection(1).XValues = "=RawData1!R" + sRowCountStart + "C1:R" + sRowCountEnd + "C1"
        ActiveChart.SeriesCollection(1).Values = "=RawData1!R" + sRowCountStart + "C8:R" + sRowCountEnd + "C8"
        ActiveChart.SeriesCollection(1).Name = "=RawData1!R1C8"
    
        ActiveChart.SeriesCollection(2).XValues = "=RawData1!R" + sRowCountStart + "C1:R" + sRowCountEnd + "C1"
        ActiveChart.SeriesCollection(2).Values = "=RawData1!R" + sRowCountStart + "C7:R" + sRowCountEnd + "C7"
        ActiveChart.SeriesCollection(2).Name = "=RawData1!R1C7"

    where sRowCountStart and sRowCountEnd are the variables. Now when I am executing this code with excel 2007 it is giving me the unexpected results where it is selecting all the columns available in RawData1 instead of column 1 and cloumn 7.

    Is there any dependency in excel versions? Any help would be much appreciated.

    Thanks in advance.
    Last edited by amazon; 05-25-2009 at 07:15 AM.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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