Dear reader and helper,
I am trying to achieve the following in excel:
I’m making an excel application where the user logs in and is brought to a specific sheet designed for him only. In this sheet I keep a few fields unlocked where the user can upload a request through a macro. This all works fine but I want to restrict the user’s options to writing plane text and pushing a macro button. All other options I prefer to be disabled: e.g. save as, all the options (File – options – advanced), basically everything on the ribbons. There will be several people using this file and I don’t want to allow people to mess with the options. On this thread (http://www.mrexcel.com/forum/excel-questions/393306-options-menu.html) I found a nice way of hiding the ribbons and going to full screen mode:
The above code is great but I have one problem with it. The user can easily exit the Full Screen Mode by minimizing or resizing the window. After minimizing and maximizing again I arrive back in the normal mode: all ribbons are visible again and you can easily go to File – Options to mess around.
Therefore my questions: is there a reason to prevent the user from exiting the Full Screen Mode ?
Alternatively is there another way to prevent the user from messing with the options ? I once saw a file where the ribbons where greyed out. That would be great as well.
Best regards,
Jonerke
I am trying to achieve the following in excel:
I’m making an excel application where the user logs in and is brought to a specific sheet designed for him only. In this sheet I keep a few fields unlocked where the user can upload a request through a macro. This all works fine but I want to restrict the user’s options to writing plane text and pushing a macro button. All other options I prefer to be disabled: e.g. save as, all the options (File – options – advanced), basically everything on the ribbons. There will be several people using this file and I don’t want to allow people to mess with the options. On this thread (http://www.mrexcel.com/forum/excel-questions/393306-options-menu.html) I found a nice way of hiding the ribbons and going to full screen mode:
Code:
Sub HideExcelStuff()
'Hide All Background Excel Stuff
With ActiveWindow
.DisplayHeadings = False 'Hides Row/Column Headings
.DisplayHorizontalScrollBar = False 'Hides Horizontal Scroll Bar
.DisplayVerticalScrollBar = False 'Hides Vertical Scroll Bar
.DisplayWorkbookTabs = False 'Hides Workbook Tabs
End With
ActiveSheet.DisplayPageBreaks = False
With Application
.DisplayFullScreen = True 'Sets Excel to Display Full Screen
.DisplayFormulaBar = False 'Hides Excel formula bar and toolbars
.DisplayStatusBar = False 'Hides Excel Status Bar
.CommandBars("Worksheet Menu Bar").Enabled = False 'Hides Excel Menus
.CommandBars("Full Screen").Visible = False 'Hides Full Screen Toolbar
.CommandBars("Standard").Visible = False 'Hides Standard Toolbar
.CommandBars("Formatting").Visible = False 'Hides Formatting Toolbar
.EnableCancelKey = xlDisabled 'Disable CTRL-BREAK
End With
End Sub
The above code is great but I have one problem with it. The user can easily exit the Full Screen Mode by minimizing or resizing the window. After minimizing and maximizing again I arrive back in the normal mode: all ribbons are visible again and you can easily go to File – Options to mess around.
Therefore my questions: is there a reason to prevent the user from exiting the Full Screen Mode ?
Alternatively is there another way to prevent the user from messing with the options ? I once saw a file where the ribbons where greyed out. That would be great as well.
Best regards,
Jonerke