If a menu item represents an option that has only two states, you can add or remove a check mark next to the menu item to indicate the current state of the option. The check mark should be alternately added or removed — and the option turned on or off, accordingly — each time the user clicks the menu item.
Use the Checked property to add or remove a check mark next to a menu item. The Checked property is True if the menu item is checked, and it's False if the menu item isn't checked. To see how this works, suppose the following procedure is assigned to the custom menu item Database on the View menu on the Worksheet menu bar. This menu item offers the user the option of viewing a worksheet either in database view or in worksheet view. Every time the user clicks the Database menu item, the procedure adds or removes a check mark next to the item and then switches views.
Sub DatabaseView() With MenuBars(xlWorksheet).Menus("View").MenuItems("Database") .Checked = Not .Checked If .Checked Then 'Switch to database view . . . Else 'Switch to worksheet view . . . End If End With End Sub