Hello Mike,
I can partially answer your second question. I am going to assume you
are talking about chart data. It would be helpful to know more about
the chart and where on the chart you want to extract information. I
bring this up because a chart has several context menus.
I am providing you with an example of how to add an item to the
context menu for a Cell on a Worksheet. This example will allow you to
call your own macro.
Code:
--------------------
Sub AddToContextMenu()
Dim cmdNew As CommandBarButton
Set cmdNew = CommandBars("cell").Controls.Add
With cmdNew
.Caption = "My Procedure" 'This is what shows on the menu
.OnAction = "MyProcedure" 'Name of the macro to execute
.BeginGroup = True
End With
End Sub
_________________________________________________
Sub RemoveContextMenuItem()
On Error Resume Next
CommandBars("cell").Controls("My Procedure").Delete
End Sub
--------------------
--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile:
http://www.excelforum.com/member.php...o&userid=18465
View this thread:
http://www.excelforum.com/showthread...hreadid=478512