From OnActivateMacro to OnActivateActionItems using charts
I'm trying to migrate a version 7.52 document to version 10. The document contains a VBScript line prop.GraphLayout.Frame.OnActivateMacro = "MacrosName" that causes a problem saying the the object doesn't support property or method: 'prop.GraphLayout.Frame.OnActivateMacro'
Obviously there were some changes and now ActionItems have to be used. To get some understanding I copied code from the API Guide and modified it. Using a list box object everything seems to work fine. Using a chart object (pivot table) as I will eventually need to I'm told 'prop.Layout' is not supported.
sub actionItemsOfListBox set myobject = ActiveDocument.GetSheetObject("LB27") set prop = myobject.GetProperties set actions = prop.Layout.Frame.OnActivateActionItems for i=0 to actions.Count-1 msgbox "Action types: " & actions.item(i).Type next end sub
So I tried a second example from the API Guide which works fine for charts but no ActionItems are shown although there is a trigger defined for the chart in the sheet properties.
I guess I'm looking in the wrong place. Maybe OnActivateActionItems ist not the right method for what I want to do? But then it seems to be ok for list boxes.
Yes, I looked at the postings in this forum but I couldn't find the answer to my problem. At least none I understood.
Can you help?
set MyGraph = ActiveDocument.GetSheetObject("8+CH491GENERIC")