Results 1 to 5 of 5

Disable Right-click

This is a discussion on Disable Right-click within the Microsoft Access forums, part of the Question Forums category; Hi All, Can anyone give me the code to disable the Right-click toolbar? Thanks in advance for any help. Regards, ...

  1. #1
    Board Regular
    Join Date
    Jul 2002
    Location
    Scotland
    Posts
    305

    Default Disable Right-click

    Hi All,

    Can anyone give me the code to disable the Right-click toolbar?

    Thanks in advance for any help.

    Regards,

    Bill

  2. #2
    BatCoder
    Join Date
    Feb 2002
    Location
    Turkey
    Posts
    764

    Default Re: Disable Right-click

    Hi Bill,

    May be this helps without a macro. Open your form in design mode and goto Properties window and Other tab "Shortcut Menu" property : set is as No.

    If you want to control this in VBA then:

    Code:
      FormName.ShortcutMenu = False
    I hope it helps.
    Suat

  3. #3
    Board Regular
    Join Date
    Jul 2002
    Location
    Scotland
    Posts
    305

    Default Re: Disable Right-click

    Hi Suat,

    Thank you very much for the reply. I am actually looking to disable the Right-click on a Worksheet, not a Form. Sorry, I should have made that clearer at the outset.


    Regards,

    Bill

  4. #4
    BatCoder
    Join Date
    Feb 2002
    Location
    Turkey
    Posts
    764

    Default Re: Disable Right-click

    Hi Bill,

    I thought that it is Access question.

    For worksheet object, you can goto worksheet class module and cancel the right click in Worksheet's BeforeRightClick event.

    Code:
    Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As Boolean)
        Cancel = True
    End Sub
    Suat

  5. #5
    Board Regular
    Join Date
    Jul 2002
    Location
    Scotland
    Posts
    305

    Default

    Hi Suat,

    Thank you very much for your help. You were correct in thinking that it was an Access question. I needed to disable the right-click in both Access and Excel and should have put the question in both forums. I got the Forums mixed up and was thinking that I was in the Excel Forum.

    Thank you once again, your infomation is perfect.

    Regards,

    Bill

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
  •  


DMCA.com