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
Bookmarks