Results 1 to 2 of 2

Disable right click events on objects

Threaded View

  1. #1
    Registered User
    Join Date
    03-26-2015
    Location
    Netherlands
    MS-Off Ver
    2013
    Posts
    75

    Disable right click events on objects

    Hi all,

    I have the following code on my sheets:
    
    Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
    If Settings.Range("Q1").Value = "User" Then
        Cancel = True
    Else
        Cancel = False
    End If
    End Sub
    It makes the user less likely to mess with a sheet without having to lock everything (which usually leads to a hundred other issues).

    Although this works great to prevent the rightclick menu from appearing, it doesnt prevent a menu from popping up whenever an object is selected. And not letting users move objects around is important to the usability of the sheets. The BeforeRightClick event seems to completely ignore rightclicks on objects. Does anyone know of a way to prevent users from selecting objects?
    Last edited by alansidman; 09-10-2016 at 11:44 AM. Reason: code tags

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Is it possible Enable one/few events, and disable rest of the events by VBA Excel?
    By hoalahpi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-21-2016, 02:24 AM
  2. [SOLVED] How to disable all Excel Events and then re-activate them?
    By Ben in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-14-2006, 09:50 AM
  3. Events won't Disable!
    By roadkill in forum Excel General
    Replies: 3
    Last Post: 04-26-2006, 02:30 PM
  4. [SOLVED] Disable events
    By Nigel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-09-2006, 02:45 AM
  5. [SOLVED] disable events does not work
    By Mika in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-15-2005, 10:05 AM
  6. [SOLVED] Disable Form Events From Being Triggered
    By JGeniti in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-14-2005, 03:05 PM
  7. disable events while macro is running
    By ben in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-24-2005, 07:22 AM

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