VB and VBA Users Source Code: Disabling right clicking on Excel's menu/command bar
[
Home
|
Contents
|
Search
|
Reply
| Previous | Next ]
VB/VBA Source Code
Disabling right clicking on Excel's menu/command bar
By:
Andrew Baker
Email (spam proof):
Email the originator of this post
Date:
Saturday, September 29, 2001
Hits:
694
Category:
Office
Article:
The following code is useful if you don't want a user to be able to edit the Excel's main menu/commandbar by right clicking on it. 'Purpose : Enables or disables Excel's main menu commandbar 'Inputs : [bEnable] If True enables the Excel's right click menu, else disables it 'Outputs : N/A 'Author : Andrew Baker 'Date : 25/03/2000 'Notes : Function CommandBarDisableRightClick(Optional bEnable As Boolean = False) As Boolean On Error GoTo ErrFailed CommandBars("toolbar List").Enabled = bEnable CommandBarDisableRightClick = True Exit Function ErrFailed: Debug.Print "Error in CommandBarDisableRightClick: " & Err.Description CommandBarDisableRightClick = False End Function
Terms and Conditions
Support this site
Download a trial version of the Excel Workbook Rebuilder