Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Jan 2002
    Location
    Washington State
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CommandBar Menu: Submenu Items (A2K, SP3)

    Hi all.

    I have a simple routine that enables/disables items on a command bar menu.

    For example:
    For Each Cbct In cbr.Controls
    Select Case Cbct.Tag
    Case "File"
    Cbct.Enabled = True 'File menu is visible
    Cbct.Controls(3).Enabled = False 'Third item in File menu is disabled

    etc...

    How can I control submenu items?
    Assuming the 4th item in the menu bumps out a submenu list, how do I disable the 2nd item in that submenu?
    Something like: Cbct.Controls(4).SubMenu(2).Enabled = False


    Thanks!
    Sam

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: CommandBar Menu: Submenu Items (A2K, SP3)

    A menu item that represents a submenu has a Controls collection of its own, so you can use

    Cbct.Controls(4).Controls(2).Enabled = False

  3. #3
    Star Lounger
    Join Date
    Jan 2002
    Location
    Washington State
    Posts
    69
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: CommandBar Menu: Submenu Items (A2K, SP3)

    Oh, ha! Of course. Why didn't I try that!?

    Thanks!

Posting Permissions

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