I want to assign an function and disable context menu for RightClick on the cell.

I just migrate from Excel VBA, in VBA Editor, I can choose the event from drop down menu.
How can I do this in Calc BASIC?


Since version 5.2 there is simpler: ToolsCustomizeContext MenusMenu (listbox): Cell

See Release notes and this example CellRightClick.ods


It seems to me that you are looking this menu

Thank you JohnSUN, the sheet Events is what I am looking for.

also thanks pierre-yves samyn show me there other methods to change the Context Menu, I was supring that Libreoffice can do this kind of optimization.

In case someone else having same problem and cant find sheet Event in Context Menu, You can find it from Sheet>Sheet Events…