+ Reply to Thread
Results 1 to 4 of 4

Right click dialog

Hybrid View

Guest Right click dialog 08-05-2005, 06:05 AM
dominicb Good morning Adam This... 08-05-2005, 06:35 AM
Guest Re: Right click dialog 08-09-2005, 07:05 PM
Guest Re: Right click dialog 08-05-2005, 08:05 AM
  1. #1
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile

    Good morning Adam

    This kind of thing can be done farily easily, although I don't think you can link in to the orignal Excel commands, you'll have to write (or record) your own macros and tie them into the code below.


    Sub Add()
    Dim NewSC As CommandBarControl
    Set NewSC = CommandBars("Cell").Controls.Add
    NewSC.Caption = "Adam's Shortcut"
    NewSC.OnAction = "Macro1"
    NewSC.BeginGroup = True
    End Sub

    Sub Remove()
    On Error Resume Next
    CommandBars("Cell").Controls("Adam's Shortcut").Delete
    End Sub

    Use the code below carefully. Once you have added a menu, it will stay in Excel - ie., it doesn't need to be invoked every time you restart Excel. You will need to use something like the code supplied to remove it. Additionally, this will only add things to the shortcut menu that appears when you right click over cells - this function is context sensitive.

    HTH

    DominicB

  2. #2
    David McRitchie
    Guest

    Re: Right click dialog

    Hi Adam,
    I like context menus, some more examples of Excel context menus
    Right Click Menus (Context Menus) in Excel
    http://www.mvps.org/dmcritchie/excel//rightclick.htm

    has four examples, I use the GetFormula one a lot, because it saves
    me a lot of typing for a quick example and reduces my typing mistakes.
    Though I may change the actual formula to GetFormulaD or GetFormat
    http://www.mvps.org/dmcritchie/excel/formula.htm




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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