Menubar.SetMenuCommandVisible
-----------------------------

Show or hide a menu command.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Menubar](component_Menubar.md) | [5.0](newinversion50.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "Menubar.SetMenuCommandVisible"; Path { ; Visible } ) 

**MBS**( **"Menubar.SetMenuCommandVisible";** /\* Show or hide a menu command. \*/  
**$Path**; /\* The ID or path to the menu entry.  
Use [Menubar.ListMenuCommands](MenubarListMenuCommands.md) to find out the IDs and names.e.g. 49297 \*/   
**$Visible**) /\* Optional; The new visible state.   
Pass 1 to make visible and 0 to hide.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| Path | The ID or path to the menu entry.   Use [Menubar.ListMenuCommands](MenubarListMenuCommands.md) to find out the IDs and names. | 49297 |  |
| Visible | The new visible state.    Pass 1 to make visible and 0 to hide. | 1 | Optional |

### Result

Returns OK or error.

### Description

Show or hide a menu command.  
This allows you to remove menu entries by path/ID from the FileMaker menu, so user cannot longer use it. The change is not permanent and whenever FileMaker rebuilds the menu, all menu entries are back.  
  
On Windows we can only remove the entry, so we do so if you pass visible = 0.  
### Examples

Hide preferences menu command:

 MBS ("Menubar.SetMenuCommandVisible"; 49153; 0)  
Hide service menu in FileMaker Pro Advanced in German:

 MBS ("Menubar.SetMenuCommandVisible"; "FileMaker Pro Advanced¶Dienste"; 0)  
### See also

- [Menubar.ListMenuCommands](MenubarListMenuCommands.md)
- [Menubar.SetMenuCommandShortcut](MenubarSetMenuCommandShortcut.md)
- [Menubar.SetMenuCommandTitle](MenubarSetMenuCommandTitle.md)

### Blog Entries

- [MBS FileMaker Plugin, version 5.4pr5](https://www.mbsplugins.de/archive/2015-11-10/MBS_FileMaker_Plugin_version_5/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 5.0 for OS X/Windows - More than 3000 Functions In One Plugin](https://www.mbsplugins.de/archive/2015-02-24/MBS_FileMaker_Plugin_50_for_OS/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 15th November 2014 , last changed 14th July 2022

  
[Menubar.SetMenuCommandTitle](MenubarSetMenuCommandTitle.md) - [MessageComposer.AddAttachmentContainer](MessageComposerAddAttachmentContainer.md)

[HTML Version](MenubarSetMenuCommandVisible.shtml)