+ Reply to Thread
Results 1 to 5 of 5

How to disable right click on a button in an excel sheet?

  1. #1
    Registered User
    Join Date
    11-22-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    23

    How to disable right click on a button in an excel sheet?

    Hi All,

    I have a worksheet which has a button.Now I want to disable right click on that button so that users cannot change or view the macro by right clicking the button.

    Appreciate your help!

  2. #2
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: How to disable right click on a button in an excel sheet?

    You can protect your vba code with password so that even if the user right clicks the button he would not be able to view / change the code unless he knows password.

  3. #3
    Registered User
    Join Date
    11-22-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: How to disable right click on a button in an excel sheet?

    I have already protected the code with pass>word but still I am able to right click on the button. Can you please tell me how you applied the protection on the sheet so that I acan match with my steps? I have done it from VBE-->Tool-->VBA Project Properties -->Protection tab

  4. #4
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: How to disable right click on a button in an excel sheet?

    You will be able to right click even if the code is protected but cannot view the code. Your worry is that user would be able to see the code if right clicked so I suggested protecting macro so that user will not be able to view or change the code. They can still right click on the button for other options.

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: How to disable right click on a button in an excel sheet?

    you could protect the worksheet
    Josie

    if at first you don't succeed try doing it the way your wife told you to

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1