Solved

Disable / Enable right click in Excel

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
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…

743 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

14 Experts available now in Live!

Get 1:1 Help Now