Consulting

Results 1 to 6 of 6

Thread: Solved: "Action" menu item?

  1. #1
    Knowledge Base Approver
    The King of Overkill!
    VBAX Master
    Joined
    Jul 2004
    Location
    Rochester, NY
    Posts
    1,727
    Location

    Solved: "Action" menu item?

    Hi all,

    I was playing around some more with the commandbar earlier, and found something I'm a little confused about. Heres what I ran:[vba]Sub Weird()
    Dim cBc As Object
    For Each cBc In Application.CommandBars("Worksheet Menu Bar").Controls
    Debug.Print cBc.Caption
    Next
    End Sub[/vba]Here is what I saw:
    Quote Originally Posted by Immediate Window
    &File
    &Edit
    &View
    &Insert
    F&ormat
    &Tools
    &Data
    A&ction
    &Window
    &Help
    I noticed that 'Action' has a .visible property of false, but even setting it to true doesnt work (and no error). There are no controls in it--I'm guessing it gets populated/visible during certain conditions, but can't figure out a rhyme or reason.

    Anyone know what it is for or anything?
    Matt

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    As far as I am aware, it serves no purpose; it has no subcontrols, it doesn't execute any code (at least nothing obvious), and so on.

    It is probably some throw-back to when Excel commandbars were being developed, it may have been some debugging tool that didn't get taken out, a bit like those messages in the VBA Aanalysis Pak.

    I have heard some claims that it has something to do with Lotus NotesFlow, but I have never used that so cannot verify. In fact, looking at the help for Lotus NotesFlow in help it seems to be referring to something else, so I doubt it.

    The good news Matt is that A&ction is one of those controls only 'discovered' by real geeks, those who don't have a real life. Welcome to the club!

  3. #3
    Knowledge Base Approver
    The King of Overkill! VBAX Master
    Joined
    Jul 2004
    Location
    Rochester, NY
    Posts
    1,727
    Location
    Quote Originally Posted by xld
    The good news Matt is that A&ction is one of those controls only 'discovered' by real geeks, those who don't have a real life. Welcome to the club!
    It's a proud day for me! I really am kinda surprised this is the first time I've seen it, as I swear I've looked at them before. Maybe I just assumed it was normal without ever putting a thought into it.
    It is weird that you can .delete it (without it coming back) but .visible=true doesnt work or error out.
    Thanks, Bob!

  4. #4
    VBAX Contributor Ivan F Moala's Avatar
    Joined
    May 2004
    Location
    Auckland New Zealand
    Posts
    185
    Location
    The Action control is related to the "Chart Menu bar", it is fired when a sheet Chart is selected > Shows the "Chart Menu bar" and hides the "Worksheet menu bar". If you have a look @ the "Chart Menu bar" it has the same control.
    Whilst it's state is invisble it is still Enabled.

    If you select a chart and then run this you will see what I mean.

    Sub TestcBc()
    On Error Resume Next
    Application.CommandBars.FindControl(30083).Execute
    End Sub
    Edit (Extra info)
    BTW ... got ID from this

    Sub Weird() 
        Dim cBc As Object 
        For Each cBc In Application.CommandBars("Worksheet Menu Bar").Controls 
            Debug.Print cBc.Caption & ":" & cBc.Id
        Next 
    End Sub
    Last edited by Ivan F Moala; 03-31-2007 at 03:28 PM.
    Kind Regards,
    Ivan F Moala From the City of Sails

  5. #5
    Knowledge Base Approver
    The King of Overkill! VBAX Master
    Joined
    Jul 2004
    Location
    Rochester, NY
    Posts
    1,727
    Location
    Interesting.. I thought it might have something to do with that, but when I deleted the A&ction entry from the Worksheet Menu Bar and the Chart Menu Bar, the menus still switch depending on what is active.. could the Action control be the 'old' way MS did it, and then later just integrated it into the programming itself without removing the control?

  6. #6
    VBAX Contributor Ivan F Moala's Avatar
    Joined
    May 2004
    Location
    Auckland New Zealand
    Posts
    185
    Location
    Interesting, yes the Action button has been around since XL 97.
    The above was just my theory on it .....
    Kind Regards,
    Ivan F Moala From the City of Sails

Posting Permissions

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