Custom Right Click Menu

Mr Nick

Board Regular
Joined
Mar 11, 2002
Messages
95
Having read previous posts on similar subjects, I can not find a satisfactory solution to my requirements.

I wish to almost entirely remove the right click menu apart from the Clear Contents option but have only come across ways to disable the menu completely.

Is it possible to use something similar to
Application.CommandBars("Right Click Menu").Controls _
("Options...").Enabled = False

Is this possible or am I going to have to rethink my strategy?
This message was edited by Mr Nick on 2002-04-03 07:06
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Try the following code:

For Each c In Application.CommandBars("Cell").Controls
If c.Caption <> "Clear Co&ntents" Then c.Delete
Next

Use the following code to reset it to the default values:

Application.CommandBars("cell").Reset
 
Upvote 0
Where exactly does this code need to be entered? I've tried it under Workbook_Open and also under Workbook_Activate but either these are the wrong positions or the code itself does not work?

Any ideas?
 
Upvote 0
On 2002-04-03 23:02, Mr Nick wrote:
Where exactly does this code need to be entered? I've tried it under Workbook_Open and also under Workbook_Activate but either these are the wrong positions or the code itself does not work?

Any ideas?

Hi Nick the code goes into the Thisworkbook
object module

eg.

<pre>
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("cell").Reset
End Sub

Private Sub Workbook_Open()
Dim C
For Each C In Application.CommandBars("Cell").Controls
If C.Caption <> "Clear Co&ntents" Then C.Delete
Next
End Sub


<pre/>
 
Upvote 0
Well, as I said, I have already tried it in this position and have tried it again but absolutely nothing changes on my right click menu.

I'm using Excel 97 if that makes any difference.

HELP!
 
Upvote 0
On 2002-04-04 01:01, Mr Nick wrote:
Well, as I said, I have already tried it in this position and have tried it again but absolutely nothing changes on my right click menu.

I'm using Excel 97 if that makes any difference.

HELP!

Silly Question but...Have you saved / closed / then opened up the File ?
 
Upvote 0
Many, Many times - believe me.

I have tried numerous ways to get this to work but still nothing!
 
Upvote 0
Oh Dear - the plot thickens!

I just opened a different workbook and then returned to the one in question and find that Right Click is now completely disabled. Whats more worrying is the fact that I have deleted this code out of the sheet but right click is still gone. Right clicking is however, still available in new books??

Where will it all end?
This message was edited by Mr Nick on 2002-04-04 01:33
 
Upvote 0
I'm using Excel 97. I've now got to a point where I have managed to completely disable the right click option and have built a custom toolbar with the options I require on that. I just need to lock this down so it isn't customizable and that'll do for what I need.

Thanks for the replies.
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,172
Members
448,554
Latest member
Gleisner2

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