Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    May 2004
    Location
    Toronto, Ontario, Canada
    Posts
    425
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Graphs (Excel 2000)

    Hi all,

    Does anyone know how to determine what number a graph is in a worksheet?

    Thanks,

    Darryl.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Graphs (Excel 2000)

    The number is 42, of course.

    But seriously, what number do you mean, and which graph? The currently selected graph?

  3. #3
    4 Star Lounger
    Join Date
    May 2004
    Location
    Toronto, Ontario, Canada
    Posts
    425
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Re: Graphs (Excel 2000)

    Hi Hans,

    I know that when you create a chart in Excel, it automatically sees the chart as a number, if you have 3 charts, the first chart is 1, and the last one would be 3, is there a way to determine if you had a number of charts, like 42 charts, how would you know which chart was the 12th one that you created.

    Thanks,
    Darryl.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 28 Times in 28 Posts

    Re: Graphs (Excel 2000)

    On the active sheet, you can refer in VBA to the 12th chart as ActiveSheet.ChartObjects(12). If you want to refer to the 12th chart on the Sheet37 worksheet (not necessarily the active worksheet), use Worksheets("Sheet37").ChartObjects(12).

    You can also put charts in separate chart sheets. They are numbered in left-to-right order of their sheet tabs, not in chronological order of creation. ActiveWorkbook.Charts(3) refers to the 3rd chart sheet in the active workbook, counting by sheet tabs from left to right. Unless you keep track of creation date/time yourself, I don't think it is possible to determine which chart sheet is the third one created; you might have dragged the sheet tabs around.

Posting Permissions

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