Freshman
Registered User.
- Local time
- Today, 04:28
- Joined
- May 21, 2010
- Messages
- 437
Hi all,
I found some code which is suppose to display all menu items:
However the code displays the default menu items and not my custom menu which I defined in a Marco as "TopMenu" (also in Access Options).
The code fails if I swap "Menu Bar" with "TopMenu"
Q1: How to I define my custom menu bar?
Q2: I need to refrence "Microsoft Office 12.0 Object Lib" for this to work. How do I do the same using Late binding
Thanks
Pierre
I found some code which is suppose to display all menu items:
Code:
Dim CB As Commandbar, crl As CommandBarControl
Set CB = CommandBars("Menu Bar")
For Each crl In CB.Controls
Msgbox crl.Caption
Next
The code fails if I swap "Menu Bar" with "TopMenu"
Q1: How to I define my custom menu bar?
Q2: I need to refrence "Microsoft Office 12.0 Object Lib" for this to work. How do I do the same using Late binding
Thanks
Pierre