Closed Thread
Results 1 to 4 of 4

Customising "right click" menu - add seperator

  1. #1
    Registered User
    Join Date
    05-26-2011
    Location
    Brisbane
    MS-Off Ver
    Office 365
    Posts
    11

    Cool Customising "right click" menu - add seperator

    I have a need to for the ability to run macros from "right clicking" on a cell (must work in Excel 2003) . I have achieved this by using the following code:

    Please Login or Register  to view this content.
    I would like to be able to do the following:

    1. put a horizontal line separator between my "Custom menu" and the remainder of the standard Excel context meny (when you right click)

    2. put a horizontal line separator between Function 2 and Function 3 on my custom menu as well.

    Any help appreciated - i am sure this is easy to do.

    Regards
    Last edited by Leith Ross; 06-09-2011 at 10:22 PM. Reason: Replaced Color Tags with Code Tags

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,241

    Re: Customising "right click" menu - add seperator

    Hi antoine,

    Excel does have an event called Before_RightClick and you put code behind the worksheet to execute this code.

    See some examples:
    http://www.vbaexpress.com/kb/getarticle.php?kb_id=437
    http://www.ozgrid.com/VBA/ExcelWorkbookEvents.htm
    http://www.ozgrid.com/Excel/free-tra...a1lesson16.htm
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    04-16-2015
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    1

    Re: Customising "right click" menu - add seperator

    Attention (Antoine Burn)
    I believe your original question was how to add a separator for items in your context menu?
    Use .BeginGroup = True

    Do an internet Search on .BeginGroup and you will find lots of exampes

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,756

    Re: Customising "right click" menu - add seperator

    No_Im_Spartacus, it is unlikely that Antoine is monitoring this thread. This thread is 4 years old and he hasn't posted to the forum since then. I suggest that as a new member you direct your energies towards current threads. Thanks.

    Thread closed.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

Closed Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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