![]() |
Toolbars: Hide now, display later
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 |
Toolbars: Hide now, display later
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 "Hal" wrote in message ... |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 | | |
All times are GMT +1. The time now is 04:44 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com