Custom menu bars on more than one computer

S

Stwange

How can I added a menu to the default menu bar, so that it is always visible
no matter which machine the database is run on? I first tried it using the
Customize, but I realized this modification was irrelevant of the database,
and so that menu was always there on this machine, and never there on other
machines.

I then tried using VBA to do this, and so far I have got:
CommandBars.ActiveMenuBar.Controls.Add(1, , , 1).Caption = "Hello"
But this doesn't come up with a caption unless I Customize - right click ->
and change the style to "Text Only (Always)" - but I can't figure out how to
do this with code. Any help would be greatly appreciated.

Thank-you.
 
R

Rick Brandt

Stwange said:
How can I added a menu to the default menu bar, so that it is always visible
no matter which machine the database is run on? I first tried it using the
Customize, but I realized this modification was irrelevant of the database,
and so that menu was always there on this machine, and never there on other
machines.

I then tried using VBA to do this, and so far I have got:
CommandBars.ActiveMenuBar.Controls.Add(1, , , 1).Caption = "Hello"
But this doesn't come up with a caption unless I Customize - right click ->
and change the style to "Text Only (Always)" - but I can't figure out how to
do this with code. Any help would be greatly appreciated.

Thank-you.

Customizations to the built in command bars are stored in the system registry.
They appear only on your machine and you see them in all MDB files you view.

Totally NEW command bars that you build are stored in the MDB itself. You will
only see them in that MDB and they will appear on ALL machines where that file
is opened.

So...build a new bar in your file and display that one instead of the built in
one. That is a requirement if you ever have anyone use the runtime anyway.
 
S

Stwange

Thanks so much mate, it seems really obvious now but I've been trying to fix
that for two days.
 
Top