Visual Basic Reference

Can't load, unload, or set Visible property for top level menus while they are merged (Error 397)

See Also

The Visible property can't be set for a top-level menu while an ActiveX component's menu is merged with a container form's menu. This error has the following cause and solution:

  • You tried to change the Visible property of a top level menu while a Visual Basic container form's menu and a linked or embedded ActiveX component's menu were sharing the same menu bar.

    Test to ensure that menus are not merged before setting Visible for top-level menus.