+ Reply to Thread
Results 1 to 14 of 14

Add-In & Cell Context (Right-Click) Menu

  1. #1
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Add-In & Cell Context (Right-Click) Menu

    Hello,

    I have created an Add-In.

    How do I add "Execute Macro" (that executes the Macro) to the Cell Context Menu in an Add-In.

    To clarify, when users load my Add-In, I would like for them to be able to right-click and access my "Execute Macro" choice similar to how one would select "Copy" or "Cut".

    Thank You,

    Tyler B. Berger

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Add-In & Cell Context (Right-Click) Menu

    You may use:
    Please Login or Register  to view this content.
    You may call this code from Workbook_Open event of your add-in.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  3. #3
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Re: Add-In & Cell Context (Right-Click) Menu

    I have:

    Please Login or Register  to view this content.
    AddToShortcut is called on Workbook Open and DeleteFromShortcut is called on Workbook Close. Works great in an .XLSM. Does not work when I convert to Add-In.

  4. #4
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Add-In & Cell Context (Right-Click) Menu

    May you zip and post add-in please? Do you have errors or simply no new control?

  5. #5
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Re: Add-In & Cell Context (Right-Click) Menu

    Izandol,

    Too much personal information in Workbook.

    No error, simply no new control.

  6. #6
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Re: Add-In & Cell Context (Right-Click) Menu

    Thanks for your help Izandol!

  7. #7
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Add-In & Cell Context (Right-Click) Menu

    It is fixed?

  8. #8
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366

    Re: Add-In & Cell Context (Right-Click) Menu

    It seems to be an issue local to my machine, sometimes it works, sometimes it doesn't.

  9. #9
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Add-In & Cell Context (Right-Click) Menu

    It is perhaps issue with worksheet view. Excel has two Cell context menus - one for Normal view and Page Layout and one for Page break preview.
    Last edited by Izandol; 02-28-2014 at 04:37 AM.

  10. #10
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366
    How do I add to all three?
    Thank You,

    EnigmaMatter

  11. #11
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366
    By the way, I keep trying to give you Rep, but it won't let me yet.

  12. #12
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Add-In & Cell Context (Right-Click) Menu

    Do not worry about rep - I wish only to repay some of what I have gained from this forum!

    Best way is to loop through commandbars collection until you find first Cell menu, add control, then add same control to commandbar with index 3 higher. You may also simply loop with counter until you have found 2 Cell menus. I think if you use CustomUI in 2010 it is easier.

  13. #13
    Forum Contributor
    Join Date
    02-04-2014
    Location
    Florida, United States
    MS-Off Ver
    Excel 2010, Excel 2013
    Posts
    366
    Thanks! I hope to contribute one day too.

    So the other cell context menus have indexes of 2 and 3?

  14. #14
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Add-In & Cell Context (Right-Click) Menu

    There are only two - one has an index 3 more than the other. For example:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Screwed Up my Right Click Context Menu, Please Help
    By cpmame in forum Excel General
    Replies: 3
    Last Post: 03-12-2009, 12:13 PM
  2. [SOLVED] access [contextual||context||right-click] [menu||commandbar] of ch
    By mrmack in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-21-2006, 04:35 AM
  3. Context menu of Cell
    By MadDog in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-04-2006, 06:35 AM
  4. Right-Click (Context Menu)
    By Kryptonix in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-25-2005, 11:05 AM
  5. [SOLVED] Right Click Context Menu
    By Guy Lapierre in forum Excel General
    Replies: 1
    Last Post: 03-30-2005, 07:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1