Solved

Disable / Enable right click in Excel

Posted on 2002-03-28
4
1,775 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

863 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now