Results 1 to 4 of 4

Customising "right click" menu - add seperator

Threaded View

  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:

    Private Sub Workbook_Open()
     
    Dim MyMenu As Object
     
    Set MyMenu = Application.ShortcutMenus(xlWorksheetCell) _
        .MenuItems.AddMenu("Custom Menu", 1)
        
    With MyMenu.MenuItems
        .Add "Function 1", "Macro 1", , 1, , ""
        .Add "Function 2", "Macro 2", , 2, , ""
        .Add "Function 3", "Macro 3", , 3, , ""
    
    End With
     
    Set MyMenu = Nothing
     
    End Sub
    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 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