Good morning, I was hoping that I could assign a macro to a Data Point in a Column Chart so that the user could then see additional narrative that goes with the figures - just something simple like selecting another worksheet actually; unfortunately I only get the Series context shortcuts when I right click. Am I asking too much?
I have been pointed towards 'GetChartElement' by Skip but think I may have lost my way. I'm trying to use point index to determine the co-ordinates of the object I really want to act as a macro button but can't find a definitive list of their meanings only,
Which is all very well and good but I can't be sure I'm using the right ones.
Anyway, I've found some more code that gets me "some" x & y co-ordinates for my object but when I proceed further I get,
And even if it didn't error, I'm not really sure how far this would get me!!
Thoughts gratefully received.
Many thanks,
D€$
I have been pointed towards 'GetChartElement' by Skip but think I may have lost my way. I'm trying to use point index to determine the co-ordinates of the object I really want to act as a macro button but can't find a definitive list of their meanings only,
"point_index depends on the item we're looking at, but is a number from 1 to 8 to identify a specific vertex within the item. For example, 2 is the upper middle of any rectangular item, such as a column in a column chart."
Which is all very well and good but I can't be sure I'm using the right ones.
Anyway, I've found some more code that gets me "some" x & y co-ordinates for my object but when I proceed further I get,
Run-time error '438':
Object doesn't support this property or method
Code:
Sub test2()
Dim dXVal As Double
Dim dYVal As Double
'We have to activate the chart to use GET.CHART.ITEM
ActiveSheet.ChartObjects("Chart 14").Activate
dXVal = ExecuteExcel4Macro("GET.CHART.ITEM(1,1,""S2P6"")") '= 425.25
dYVal = ExecuteExcel4Macro("GET.CHART.ITEM(2,4,""S2P6"")") '= 124.5
ActiveSheet.ChartObjects("Chart 14").SeriesCollection(2).Points(6).GetChartElement dXVal, dYVal, xlNothing
End Sub
And even if it didn't error, I'm not really sure how far this would get me!!
Thoughts gratefully received.
Many thanks,
D€$