Solved

How do I add a custom context menu item to the context menu of an Excel 2010 comment box

Posted on 2014-09-11
2
206 Views
Last Modified: 2014-09-13
I have code that inserts a picture into the comment box of an Excel cell.  I created this for a project where I had to do a mass population of a spreadsheet.  I would now like to add it to the context menu of the comment box that appears when you do a right click on the comment box.  

So I need to know how to create this item and execute my code when its selected?
0
Comment
Question by:NevSoFly
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 51

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 40318708
Hi,

pls try

Sub Menu_Modify()
Menu_reset
With CommandBars("Shapes")
    .Controls.Add(Type:=msoControlButton, before:=1).Caption = "&Add my Thing"
    .Controls("Add my thing").OnAction = "'" & ThisWorkbook.Name & "'!" & "myCode"
    .Controls(2).BeginGroup = True
End With

End Sub


Sub Menu_reset()
CommandBars("Shapes").Reset
End Sub

Open in new window

Regards
0
 

Author Closing Comment

by:NevSoFly
ID: 40320830
thanks that will do the trick.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question