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 ?
Yes it is....here is some code that should do it but use caution. It will hide all CommandBars within the Access application. If there is one or more items you want to remain Visible then you will need to set that condition within the code. For your particular situation I would do this:
Dim Z As Integer
On Error Resume Next
For Z = 1 To Application.CommandBars.Count
If Application.CommandBars(Z).Visible = True Then
Application.CommandBars(Z).Visible = False
Application.CommandBars("Toolbar1").Visible = True
If Err <> 0 Then Err.Clear
Last edited by CyberLynx; 05-28-06 at 17:47.
Self Taught In ALL Environments.....And It Shows!