By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,294 Members | 2,588 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,294 IT Pros & Developers. It's quick & easy.

invisible toolbar

P: n/a
With my command DoCmd.ShowToolbar "Toolbar1", acToolbarYes i make my
toolbar Toolbar1 visible.I want at the same time make all
other
toolbars on the screen invisible,regardless how they are
called.Sometimes i have
different toolbars shown and i am interested in a command
that does
not refer toa specific toolbar, but makes all the toolbats
on the
screeninvisible.Is it possible ?

May 28 '06 #1
Share this Question
Share on Google+
2 Replies


ADezii
Expert 5K+
P: 8,638
With my command DoCmd.ShowToolbar "Toolbar1", acToolbarYes i make my
toolbar Toolbar1 visible.I want at the same time make all
other
toolbars on the screen invisible,regardless how they are
called.Sometimes i have
different toolbars shown and i am interested in a command
that does
not refer toa specific toolbar, but makes all the toolbats
on the
screeninvisible.Is it possible ?
This should do the trick:
On Error Resume Next

Dim MyCommandBar As CommandBar

For Each MyCommandBar In Application.CommandBars
If MyCommandBar.Name <> "Toolbar1" Then
MyCommandBar.Visible = False
End If
Next MyCommandBar
May 28 '06 #2

P: n/a

"solar" <sp*******@gmail.com> schreef in bericht news:11**********************@u72g2000cwu.googlegr oups.com...
With my command DoCmd.ShowToolbar "Toolbar1", acToolbarYes i make my
toolbar Toolbar1 visible.I want at the same time make all
other
toolbars on the screen invisible,regardless how they are
called.Sometimes i have
different toolbars shown and i am interested in a command
that does
not refer toa specific toolbar, but makes all the toolbats
on the
screeninvisible.Is it possible ?


I could not find a solution but maybe the command
DoCmd.RunCommand acCmdShowOnlyWebToolbar
will help you.
This command seems to make all toolbars invisible except the Toolbar "web" (if visible)

So I would try:
DoCmd.RunCommand acCmdShowOnlyWebToolbar
DoCmd.ShowToolbar "Web", acToolbarNo
DoCmd.ShowToolbar "Toolbar1", acToolbarYes

Arno R
May 28 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.