Is there any way to hide all the toolbars

LostCause

Board Regular
Joined
Jul 13, 2006
Messages
99
Firstly, thanks for reading.

I would like there to be very little to let a person know that what they are using is an Excel spreadsheet.

I know how to manually remove gridlines, sheet tabs, row and column headers, Horizontal and Vertical scroll bars and formula bar etc

I also know how to manually remove toolbars.

Could there be VB code which does all this (and also moves the worksheet menu bar to the bottom).

I envision something similar to this:



I am aware that this would look very different to how people normally use Excel and have two concerns

1) I would want the file to load this way REGARDLESS of what people's default settings are

2) Is there any way to return to people's default settings (or not make the changes permanent?)

Thanks
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
You might want to consider .HTM. At any rate, as to the toolbars, IN VBA you can go
Application.CommandBars("Task Pane").Visible = False
Application.CommandBars("Reviewing").Visible = False
(etc.) to hide toolbars.

Maybe full-screen mode will suit you:
Application.DisplayFullScreen = True

Try the macro recorder for some of your other objectives.
 
Upvote 0
As to non-permanence, if you use VBA, you should save the initial settings before changing them, and the Workbook BeforeClose event could clean up. (And don't bet any money that people won't somehow not fire off the BeforeClose code, leading to panic and support calls :cry: )
 
Upvote 0
Hello LostCause,
Here's an example of how that sort of stuff is done.
Beware though that a lot of people can get rather unpleasent (not to mention confused!) when
we mess with things like this.
What is below won't reset things to what the user had showing/enabled at the time, that would
require you to loop through each toolbar, commandbar. etc. and store their status in a
public variable then loop back through them when you want to restore. (Which I could
do if I had more time.)
But below is how you can turn everythng off at workbook open and provide a way for the
user(s) to manually restore. It will also return the ability to restore automatically upon
workbook close.

Put this in a standard module:
Code:
Sub ResetAll()
Application.CommandBars("Worksheet Menu Bar").Enabled = True
With ActiveWindow
  .DisplayGridlines = True
  .DisplayHeadings = True
  .DisplayWorkbookTabs = True
End With
End Sub
And then put these in the ThisWorkbook module:
Code:
Private Sub Workbook_Open()
Dim Cb As CommandBar
With Application
  .ScreenUpdating = False
  For Each Cb In .CommandBars
    If Cb.Type = msoBarTypeNormal Then Cb.Visible = False
  Next Cb
  .DisplayFormulaBar = False
  .CommandBars("Worksheet Menu Bar").Enabled = False
  .WindowState = xlMaximized
  .ScreenUpdating = True
End With
With ActiveWindow
    .DisplayGridlines = False
    .DisplayHeadings = False
    .DisplayWorkbookTabs = False
    .DisplayHorizontalScrollBar = False
    .DisplayVerticalScrollBar = False
End With
End Sub


Private Sub Workbook_BeforeClose(Cancel As Boolean)
ResetAll
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,590
Messages
6,120,421
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top