Consulting

Results 1 to 6 of 6

Thread: Disable row in 2003 Chart

  1. #1
    VBAX Contributor
    Joined
    May 2008
    Posts
    198
    Location

    Disable row in 2003 Chart

    I have a chart that I need to make the first row optional. This is the old style chart, not an Excel-based chart. An example image I found for discussion purposes here.

    Manually, I can turn off a row by double clicking on the leftmost 'cell' - e.g. double clicking on the button/cell to the left of the 'West' label cell in the rreferenced image would turn off row 2 in that chart, and the middle light green bars would be removed from the chart.

    I need to be able to turn on or off a row in my code. I can access other items, such as the cell values or Chart Title like this:
    [vba] oShape.OLEFormat.Object.ChartTitle.Text
    [/vba]
    but I don't know how to reference that part of the chart. Is there a property or method to include/exclude a row from the chart?.

    I hope someone can help me on this, it has been thrown at me with little time to solve the issue. Thanks in advance


    Edit: I'd also like to know if there is somewhere where I can view the complete object hierarchy of these chart objects. I have never found one.
    Last edited by Cosmo; 02-17-2012 at 07:35 AM.

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    Hi Mark

    Maybe this:??

    [VBA]Dim oChart as Object
    Set oChart=oShape.OLEFormat.Object
    oChart.Application.DataSheet.Rows(2).Include=False[/VBA]
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    VBAX Contributor
    Joined
    May 2008
    Posts
    198
    Location
    Quote Originally Posted by John Wilson
    Hi Mark

    Maybe this:??

    [vba]Dim oChart as Object
    Set oChart=oShape.OLEFormat.Object
    oChart.Application.DataSheet.Rows(2).Include=False[/vba]
    Thank you, John! Whenever I'm under such a rush deadline, I can't tell you how good it is to see your name listed in a response to my inquiries. That does the trick.

    I still have a lot of work to integrate this into my current application, but now I don't have any unknowns to deal with.

    Once again, you have saved my day!

  4. #4
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  5. #5
    VBAX Contributor
    Joined
    May 2008
    Posts
    198
    Location
    Quote Originally Posted by John Wilson
    Thanks again. After your post, I realized I could add a reference to the Graph object library to the file, and then view the contents in the object browser window (I haven't checked, that might be the same thing that you sent the link for). Been a long time since I had to do that, so the brain cells that remembered how to do that must have been some of the ones that have been fried since then.

    Thanks again. I hope you're keeping track of how many beers I owe you, because the part of my brain which remembered that has also been fried.

  6. #6
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    I hope you're keeping track of how many beers I owe you, because the part of my brain which remembered that has also been fried.
    In that case it's two cases of Alaskan Red Beer and a bottle of Malt Whiskey. Please deliver to Arizona in October (Presentation Summit)
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Posting Permissions

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