ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Toolbar not hiding (https://www.excelbanter.com/excel-programming/398880-toolbar-not-hiding.html)

Mike K

Toolbar not hiding
 
Oh Wise Ones,
I have a workbook that needs a lot of screen area.
It was loading the "Web" toolbar when it opened. I have added code to
close/hide the toolbar but it is not working. What am I doing wrong?

Code in ThisWorkbook:

Private Sub Workbook_Open()
Application.CommandBars("ActiveFactory").Visible = False
Application.CommandBars("Web").Visible = False
End Sub


Thanks,
Mike

Chip Pearson

Toolbar not hiding
 
I have seen circumstances in which Excel doesn't quite have itself
completely together when the Workbook_Open event runs. You might try using a
macro named Auto_Open (in a regular code module, not the ThisWorkbook
module) instead of Workbook_Open. Auto_Open runs later than Workbook_Open,
and Excel has itself put together by the time Auto_Open is called.

Also, you might want to consider changing to full screen mode. This hides
everything except the menu bar, the sheet tabs, and the scroll bars.

Application.DisplayFullScreen = True ' False to reset


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)

"Mike K" wrote in message
...
Oh Wise Ones,
I have a workbook that needs a lot of screen area.
It was loading the "Web" toolbar when it opened. I have added code to
close/hide the toolbar but it is not working. What am I doing wrong?

Code in ThisWorkbook:

Private Sub Workbook_Open()
Application.CommandBars("ActiveFactory").Visible = False
Application.CommandBars("Web").Visible = False
End Sub


Thanks,
Mike




All times are GMT +1. The time now is 03:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com