[AccessD] CommandBarControl subitems

Susan Harkins harkins at iglou.com
Mon Apr 7 14:47:21 CDT 2003


If a CommandBarControl on a menu bar contains submenus, how do I cycle
through that control's collection to list the submenus? This is driving me
nuts -- I can't figure out how to reference a control's Collection -- does a
control have a collection? I'm assuming it does if there are submenus?????


Dim cbarMenu As CommandBar
  Dim cbarControl As CommandBarControl
  Dim cbarSub As CommandBarControl
  'Dim cbarcolControls As CommandBarControls
  Set cbarMenu = CommandBars(barname)
  For Each cbarControl In cbarMenu.Controls
    If cbarControl.Id = controlname Then
      For Each control in cbarControl's collection...


This is where I get lost -- at this point, I need to declare cbarControl's
collection, and I can't get it.


Susan H.



More information about the AccessD mailing list