Right Click Button

T

T.R.

I downloaded the XY Chart Labler into Excel and I would
like to add it to my right click button.

Is there a way to add something to the right click button?

Thanks.

T.R.
 
D

Dave Peterson

Rob Bovey's XY Chart Labeler?

If yes, then Rob's code is open for you to change.

But first save a copy (just in case) and second if this breaks Rob's addin, you
can't complain to Rob!

Get to the VBE and open the xychartlabeler project.
Expand the project explorer until you can see Modules.
Under Modules is code that adds the option to the menubars. It's called
MOpenClose.

Modify it slightly:

In the Auto_open Sub:
Change #1:
Dim ctlToolsMenu As Office.CommandBarPopup
becomes
Dim ctlToolsMenu As Object 'Office.CommandBarPopup

Change #2:
Set ctlToolsMenu = Application.CommandBars(lCount).FindControl(, glMENU_TOOLS)
becomes
Select Case lCount
Case 1, 2
Set ctlToolsMenu _
= Application.CommandBars(lCount).FindControl(, glMENU_TOOLS)
Case 3
Set ctlToolsMenu = Application.CommandBars("Cell")
Case 4
Set ctlToolsMenu = Application.CommandBars("Object/Plot")
End Select

In the Auto_Close sub:

Right before the "End Sub" add these two lines:

Application.CommandBars("cell").Controls(gszMENU_APP).Delete
Application.CommandBars("object/plot").Controls(gszMENU_APP).Delete

=========
This adds the xychart stuff to the rightclick menu when you click on a cell and
also when you click on the chart--(not all elements of the chart, though).

Remember to keep a back up copy of Rob's addin--just in case.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top