Solved

Disable / Enable right click in Excel

Posted on 2002-03-28
4
1,783 Views
Last Modified: 2012-05-04
Hi all,

Is there a way to disable and enalbe the right click in Excel (maybe registry setting?).
My application uses an Excel sheet and for some reasons, some times I need to disable or enable the right click on the sheet. Is this possible?

Thanks a lot.
Catouch
0
Comment
Question by:Catouch
  • 3
4 Comments
 
LVL 44

Accepted Solution

by:
bruintje earned 50 total points
ID: 6902207
Hi Catouch,

Thanks to Chip Pearson

Sub test2()

''To disable the right click menu on the sheet TAB, use

Application.CommandBars("Ply").Enabled = True

''To disable the standard cell right-click menu for a cell, use

Application.CommandBars("Cell").Enabled = True

End Sub

HTH:O)Bruintje
0
 
LVL 44

Expert Comment

by:bruintje
ID: 6902208
don't forget to set them to true if you want to use the right-click again
0
 
LVL 1

Author Comment

by:Catouch
ID: 6902222
Wors like a charm, thanks a lot
0
 
LVL 44

Expert Comment

by:bruintje
ID: 6902228
glad it helped
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question