Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Disable / Enable right click in Excel

Posted on 2002-03-28
4
Medium Priority
?
1,854 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 200 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

926 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