+ Reply to Thread
Results 1 to 4 of 4

Sub-Menu Items - How Do I Add To My Custom Menu?

  1. #1

    Sub-Menu Items - How Do I Add To My Custom Menu?

    Hello.

    I figured out how to put a "custom" menu item on my personal.xls
    worksheet, and attach a macro to it. What I actually want, however,
    is to add menu SUB-items that cascade from my main custom menu. I do
    not see where I can edit the one menu item to add additional sub-items.


    Does anyone know how to do this?

    Thanks,
    Jessi


  2. #2
    Franz Verga
    Guest

    Re: Sub-Menu Items - How Do I Add To My Custom Menu?

    Nel post news:[email protected]
    *[email protected]* ha scritto:

    > Hello.
    >
    > I figured out how to put a "custom" menu item on my personal.xls
    > worksheet, and attach a macro to it. What I actually want, however,
    > is to add menu SUB-items that cascade from my main custom menu. I do
    > not see where I can edit the one menu item to add additional
    > sub-items.
    >
    >
    > Does anyone know how to do this?
    >
    > Thanks,
    > Jessi



    Hi Jessi,

    You have to go in customization mode (right click on a toolbar, Customize),
    then click on the tab Commands, in the Category search for New Menu and from
    the Commands section drag the item New Menu & drop inside your custom menu.
    Then you can customize as you want.

    --
    (I'm not sure of names of menues, option and commands, because
    translating from the Italian version of Excel...)

    Hope I helped you.

    Thanks in advance for your feedback.

    Ciao

    Franz Verga from Italy



  3. #3
    Bob Phillips
    Guest

    Re: Sub-Menu Items - How Do I Add To My Custom Menu?

    Here is an example that puts a sub-menu on the Tools menu with two
    sub-menus.

    Dim oCb As CommandBar
    Dim oCtl As CommandBarPopup
    Dim oCtlBtn As CommandBarButton

    Set oCb = Application.CommandBars("Worksheet Menu Bar")
    With oCb
    Set oCtl = .Controls("Tools").Controls.Add( _
    Type:=msoControlPopup, _
    temporary:=True)
    oCtl.Caption = "myButton"
    With oCtl
    Set oCtlBtn = .Controls.Add( _
    Type:=msoControlButton, _
    temporary:=True)
    oCtlBtn.Caption = "myMacroButton"
    oCtlBtn.FaceId = 161
    oCtlBtn.OnAction = "myMacro"
    End With
    With oCtl
    Set oCtlBtn = .Controls.Add( _
    Type:=msoControlButton, _
    temporary:=True)
    oCtlBtn.Caption = "myMacroButton2"
    oCtlBtn.FaceId = 161
    oCtlBtn.OnAction = "myMacro2"
    End With
    'etc.
    End With

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    <[email protected]> wrote in message
    news:[email protected]...
    > Hello.
    >
    > I figured out how to put a "custom" menu item on my personal.xls
    > worksheet, and attach a macro to it. What I actually want, however,
    > is to add menu SUB-items that cascade from my main custom menu. I do
    > not see where I can edit the one menu item to add additional sub-items.
    >
    >
    > Does anyone know how to do this?
    >
    > Thanks,
    > Jessi
    >




  4. #4

    Re: Sub-Menu Items - How Do I Add To My Custom Menu?

    Thanks, guys. It was a big help!

    Jessi


+ 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