![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Location: Manchester, UK
Posts: 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 ] |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
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
__________________
Kind regards, Al Chara |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Location: Manchester, UK
Posts: 95
|
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? |
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
object module eg.
|
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Mar 2002
Location: Manchester, UK
Posts: 95
|
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! |
|
|
|
|
|
#6 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
|
|
|
|
|
|
|
#7 |
|
Board Regular
Join Date: Mar 2002
Location: Manchester, UK
Posts: 95
|
Many, Many times - believe me.
I have tried numerous ways to get this to work but still nothing! |
|
|
|
|
|
#8 |
|
Board Regular
Join Date: Mar 2002
Location: Manchester, UK
Posts: 95
|
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 ] |
|
|
|
|
|
#9 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
What version of excel are you running, because I swear the code works for me?
|
|
|
|
|
|
#10 |
|
Board Regular
Join Date: Mar 2002
Location: Manchester, UK
Posts: 95
|
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. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|