+ Reply to Thread
Results 1 to 4 of 4

Delete MenuItem

Hybrid View

  1. #1
    Avi
    Guest

    Delete MenuItem

    I try to delete the "Chart" subMenu item in the "Insert" menu item on the
    main menu file of Excel with the following commands

    Sub DeleteIt()
    MenuBars(xlWorksheet).Menus("Insert").MenuItems("Chart").Delete
    End Sub

    But i get "Applicatin defined error message

    The procedure works fine with other menu items.

    Please help...

    Avi

    www.avibenita.com



  2. #2
    Jim Thomlinson
    Guest

    RE: Delete MenuItem

    Off the top of my head I think you need "Chart..." instead of "Chart". Chart
    brings up a wizard/form so it is "Chart..." (dot dot dot is Microsofts way of
    saying that the button will bring up a form asking for more info) in the
    menu.
    --
    HTH...

    Jim Thomlinson


    "Avi" wrote:

    > I try to delete the "Chart" subMenu item in the "Insert" menu item on the
    > main menu file of Excel with the following commands
    >
    > Sub DeleteIt()
    > MenuBars(xlWorksheet).Menus("Insert").MenuItems("Chart").Delete
    > End Sub
    >
    > But i get "Applicatin defined error message
    >
    > The procedure works fine with other menu items.
    >
    > Please help...
    >
    > Avi
    >
    > www.avibenita.com
    >
    >
    >


  3. #3
    Avi
    Guest

    Re: Delete MenuItem

    Thanks so much
    Works perfectly!!!!!!!!!!!


    Avi Benita 054-4660641 wwwAvi Benita 054-4660641 www.avibenita.com
    "Jim Thomlinson" <[email protected]> wrote in message
    news:[email protected]...
    > Off the top of my head I think you need "Chart..." instead of "Chart".
    > Chart
    > brings up a wizard/form so it is "Chart..." (dot dot dot is Microsofts way
    > of
    > saying that the button will bring up a form asking for more info) in the
    > menu.
    > --
    > HTH...
    >
    > Jim Thomlinson
    >
    >
    > "Avi" wrote:
    >
    >> I try to delete the "Chart" subMenu item in the "Insert" menu item on the
    >> main menu file of Excel with the following commands
    >>
    >> Sub DeleteIt()
    >> MenuBars(xlWorksheet).Menus("Insert").MenuItems("Chart").Delete
    >> End Sub
    >>
    >> But i get "Applicatin defined error message
    >>
    >> The procedure works fine with other menu items.
    >>
    >> Please help...
    >>
    >> Avi
    >>
    >> www.avibenita.com
    >>
    >>
    >>




  4. #4
    Dave Peterson
    Guest

    Re: Delete MenuItem

    This worked ok for me in xl2003 (xl97+).

    Application.CommandBars("Chart Menu Bar") _
    .Controls("Insert").Controls("Chart...").Delete

    Are you still using xl95 (when menubars() had to be used.)



    Avi wrote:
    >
    > I try to delete the "Chart" subMenu item in the "Insert" menu item on the
    > main menu file of Excel with the following commands
    >
    > Sub DeleteIt()
    > MenuBars(xlWorksheet).Menus("Insert").MenuItems("Chart").Delete
    > End Sub
    >
    > But i get "Applicatin defined error message
    >
    > The procedure works fine with other menu items.
    >
    > Please help...
    >
    > Avi
    >
    > www.avibenita.com


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1