Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2004
    Posts
    39

    Question Unanswered: Changing Chart Source Data

    Hi,
    Actually I'm exporting data from access database to excel workbook automatically. I have done many calculations to the data. But now the problem is there is a chart in the workbook and I need to add my new data which is one row to the chart's source data.
    Can anyone help me out with any functions relating to charts that can be coded in access.
    Thanks.

  2. #2
    Join Date
    Jun 2004
    Posts
    39
    anyone help me out.its urgent

  3. #3
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    Hi madhavi

    are you doing this automatically then you can use

    ActiveChart.SetSourceData (Rangeobject of source data)
    this will rebuild your chart for you

    if your coming from access you will need to qualify it fully such as

    worksheets("Chartsheet").charts(1).setsourcedata newrange

    with newrange as a previously devised range that you have got
    try running your code for the chart in excel before transfering to Access

    I havn't tested this so if it doesn't work properly let me know of the problems

    David

  4. #4
    Join Date
    Jun 2004
    Posts
    39
    This code worked out for me.'m doing it from access and the chart is not activating. so i had to use chartobjects to activate it. I used the following code.

    appxl.Worksheets(1).ChartObjects("chart 1").Activate

    appxl.ActiveChart.SetSourceData (appxl.ActiveSheet.Range(appxl.ActiveSheet.Cells(b eginrow,begincol), appxl.ActiveSheet.Cells(endROW,endcol)))

    Thanks for your reply.

Posting Permissions

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