Toolbars: Hide now, display later

G

Guest

I want to code a procedure which will make note of all currently active
toolbars when the workbook opens. I then want to hide those toolbars and
display only the custom toolbar I have. Once I am done with this workbook, I
want to reactivate the previously active toolbars.

The following code hides them all with the exception of the Adobe pdf maker
6.0 toobar. Your ideas and solutions are appreciated.

Hal

Private Sub Auto_Open ()

S1$ = Application.CommandBars.Count
For Each bar In Application.CommandBars
If bar.BuiltIn And Not S1$ = 0 Then bar.Enabled = Flase
S1$ = S1$ -1
Next

End Sub
 
J

Jim Rech

Adobe is not built-in since it is not part of Excel natively. Also I think
you want to make .Visible = False rather than .Enabled (that is, if you want
it not to be seen as opposed to being merely grayed-out).

--
Jim
|I want to code a procedure which will make note of all currently active
| toolbars when the workbook opens. I then want to hide those toolbars and
| display only the custom toolbar I have. Once I am done with this workbook,
I
| want to reactivate the previously active toolbars.
|
| The following code hides them all with the exception of the Adobe pdf
maker
| 6.0 toobar. Your ideas and solutions are appreciated.
|
| Hal
|
| Private Sub Auto_Open ()
|
| S1$ = Application.CommandBars.Count
| For Each bar In Application.CommandBars
| If bar.BuiltIn And Not S1$ = 0 Then bar.Enabled = Flase
| S1$ = S1$ -1
| Next
|
| End Sub
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top