I have a custom menu bar ("DTSheet") with three popups each of whihc has a number of (sub)menu items. Each of the three menu bar popups has an index which I can find using:
For Each cntrl In CommandBars("DTSheet").Controls
If cntrl.Visible = True Then MsgBox (cntrl.Index)
Next cntrl
However, this only finds the main menu bar controls, it does not find the (sub)menu item controls. I had hoped to beat it by using the following:
For Each cntrl In CommandBars("DTSheet").Controls(1)
If cntrl.Visible = True Then MsgBox (cntrl.Index)
Next cntrl
to find the controls in each menu bar popup in turn. But this returns an "Object does not support this proprty or method" error.
Any help much appreciated
Mick
Bookmarks