Log in

View Full Version : Disable row in 2003 Chart



Cosmo
02-17-2012, 07:09 AM
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 (http://www.virtual508.com/images/chart2.jpg).

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:
oShape.OLEFormat.Object.ChartTitle.Text

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.

John Wilson
02-17-2012, 08:06 AM
Hi Mark

Maybe this:??

Dim oChart as Object
Set oChart=oShape.OLEFormat.Object
oChart.Application.DataSheet.Rows(2).Include=False

Cosmo
02-17-2012, 08:19 AM
Hi Mark

Maybe this:??

Dim oChart as Object
Set oChart=oShape.OLEFormat.Object
oChart.Application.DataSheet.Rows(2).Include=False

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!

John Wilson
02-17-2012, 08:36 AM
http://www.pptalchemy.co.uk/Downloads/vbagr10.chm

Not perfect but can help

Cosmo
02-17-2012, 01:14 PM
http://www.pptalchemy.co.uk/Downloads/vbagr10.chm

Not perfect but can help
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.

John Wilson
02-19-2012, 02:37 AM
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)