Can anyone using Excel 365 please help me identify the problem with a cell shortcut menu added as a workbook open routine?
In Excel 2013 the below code previously created a shortcut right-click menu from any cell. However since migrating to Excel 365 it no longer functions. I have tried various fixes and searched high and low for an answer but unsure why the code no longer works. The procedure is placed in the ThisWorkbook module.
Thanks in advance for any suggestions.
In Excel 2013 the below code previously created a shortcut right-click menu from any cell. However since migrating to Excel 365 it no longer functions. I have tried various fixes and searched high and low for an answer but unsure why the code no longer works. The procedure is placed in the ThisWorkbook module.
VBA Code:
Private Sub Workbook_Open()
Shortcuts
End Sub
Public Sub Shortcuts()
Dim MyMenu As Object
Set MyMenu = Application.ShortcutMenus(xlWorksheetCell).MenuItems.AddMenu("Countries", 1)
With MyMenu.MenuItems
.Add "CAN", "CAN_cut", , 1, , ""
.Add "ESP", "ESP_cut", , 2, , ""
.Add "FRA", "FRA_cut", , 3, , ""
.Add "GBR", "GBR_cut", , 4, , ""
.Add "USA", "US_cut", , 5, , ""
End With
Set MyMenu = Nothing
End Sub
Thanks in advance for any suggestions.