Disabling functions in excel

Sharid

Well-known Member
Joined
Apr 22, 2007
Messages
1,066
Office Version
  1. 2016
Platform
  1. Windows
I wrote this code below to show the full screen in excel, (no tool bars showing) I also want to disable all the commands on the top command menu bar apart from the dropdowns in the file option.

i.e. all the commands from Edit to Help are disabled apart from the File option. on exit of excel I want them to be enabled.

Also not sure if this is possible but is there a way to disable the Close option in the file drop down menu, leaving the user with the option to click Exit. As Exit will close excel were as the close option allows the user to close the workbook. On exit every thing is enabled.

And my final request, the X in the top right hand corner is there a way to disable it and on exit of excel enable it?



Private Sub Workbook_Activate()
Application.DisplayFullScreen = True
Application.CommandBars("Full Screen").Visible = False
UserForm1.Show
End Sub



Private Sub Workbook_Deactivate()
Application.DisplayFullScreen = False
End Sub
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Forum statistics

Threads
1,224,521
Messages
6,179,285
Members
452,902
Latest member
Knuddeluff

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