Solved

Disable / Enable right click in Excel

Posted on 2002-03-28
4
1,804 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB6 Compile Compatibility Issue 4 131
Getting warning: You are about to delete 1 row(s) 9 61
Recommendation vb6 to vb.net or others 14 241
Macro problems with Excel file 6 52
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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 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…

751 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