How do I remove an ApplicationMenu MenuItem ?

I have this menuitem originally in FileMenu that I made ApplicationMenuItem, which I wish to remove selectively in code depending on the type of distribution.

There does not seem to be any direct method to access the ApplicationMenu.

I can access the menuitem I want to remove in FileMenuItem.Item(11) and verify its name, but I cannot remove it with

If NoUpdate then FileMenu.remove(11)

The code does not trigger any error, but does not delete the menuItem from the ApplicationMenu. Yet, if I try to access it after deleting it, I do get an out of bound error. Meaning it is no longer in FileMenu.

If I try to access ApplicationMenuItem directly, I get a static reference error.

I will appreciate any pointer. TIA.

How about

NameOfItem.Close

Or

NameOfItem.Visible = False

[quote=371466:@Greg O’Lone]How about

NameOfItem.Close

Or

NameOfItem.Visible = False

Same difference. No error, but nothing happens. It looks like what shows in the Application menu is a clone, and not the original MenuItem.

I guess the only way I have to manage that is by preparing a new menubar, and switch according to needs.

Michel… where are you putting those?

nameofitem.visible=false

works for me… in ENABLEMENUITEMS event

Thank you Dave :slight_smile: