Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
212 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 52

Accepted Solution

by:
Rgonzo1971 earned 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
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…

715 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