Presetting options when opening Excel
Private Sub Workbook_Open()
Worksheets(MTSheet).Select
Range("A1").Select
ActiveWindow.ScrollRow = 1
ActiveWindow.ScrollColumn = 1
Application.EnableCancelKey = xlDisabled
Application.CommandBars("Formatting").Visible = False
Application.CommandBars("Borders").Visible = False
Application.CommandBars("Chart").Visible = False
Application.CommandBars("Control Toolbox").Visible = False
Application.CommandBars("Drawing").Visible = False
Application.CommandBars("External Data").Visible = False
Application.CommandBars("Forms").Visible = False
Application.CommandBars("Formula Auditing").Visible = False
Application.CommandBars("Picture").Visible = False
Application.CommandBars("PivotTable").Visible = False
Application.CommandBars("Protection").Visible = False
Application.CommandBars("Reviewing").Visible = False
Application.CommandBars("Text To Speech").Visible = False
Application.CommandBars("Visual Basic").Visible = False
Application.CommandBars("Watch Window").Visible = False
Application.CommandBars("Web").Visible = False
Application.CommandBars("WordArt").Visible = False
Application.CommandBars("Standard").Visible = False
Application.CommandBars("Stop Recording").Visible = False
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("Standard").Visible = True
End Sub
"Josh C" wrote:
I want to open Excel and run a program that has some sensitive material. I do
not want the user to do anything without using buttons that I have developed.
I would like to make sure that all the toolbars are removed and most of the
menu items bars are not useable. I have to do this because each computer
opens Excel the same way it was shut down last. I will also had to restore
the menu options, so the next time the user is in a different Excel file they
can use them.
|