If RetrieveEssbase is working why don't you put PasteonlyValues in the same module?
This is a discussion on can't find macro custom right click menu within the Excel Questions forums, part of the Question Forums category; Hi, Creating custom right click menu options, but having issues finding the macro that I'm trying to call. The following ...
Hi,
Creating custom right click menu options, but having issues finding the macro that I'm trying to call.
The following is added to VBA personal.xls ThisWorkbook:
I then have the following in Cell_Menu module:Code:Option Explicit Private Sub Workbook_Open() application.CommandBars("Cell").Reset With application.CommandBars("cell").Controls With .Add .Caption = "&Retrieve" .OnAction = "!RetrieveEssbase" .Tag = "Retrieve essbase for selection" .BeginGroup = True End With With .Add .Caption = "Paste &Values" .OnAction = "!PasteonlyValues" .Tag = "Paste Special Values" End With End With End Sub
The macros are added to the right click menu, and the Essbaseretrieve works fine, but when I click the paste special values option, it says it can't find the macroCode:Sub PasteonlyValues() selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False End Sub
any ideas why this wouldn't be working?
Thanks,
Martin
If RetrieveEssbase is working why don't you put PasteonlyValues in the same module?
Microsoft MVP - Excel
or change the OnAction to
Code:.OnAction = "Cell_Menu.PasteonlyValues"
Rory
Microsoft MVP - Excel.
Questions are the cure for ignorance
Thanks Rorya, adding the cell_menu. seemed to do the trick
Strange, I already had the paste special code in the same module as the essbase retrieve, however I don't have to add the cell_menu to the later. Not sure why but it is working now so thanks alot![]()
Bookmarks