+ Reply to Thread
Results 1 to 2 of 2

[SOLVED] capture right mouse button click event on cell

  1. #1
    Reinhard Thomann
    Guest

    [SOLVED] capture right mouse button click event on cell

    Hi,
    how can i capture the right mouse button click event on a cell. I'd like to
    enable/disable commands of the context menu in dependence to the selected
    column.

    TIA
    Reinhard



  2. #2
    Bob Phillips
    Guest

    Re: capture right mouse button click event on cell

    Hi Reinhard,

    Here is some event code to do it. Change th 9 to your column number.

    Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
    Boolean)
    If Target.Column = 9 Then
    Cancel = True
    End If
    End Sub

    'This is worksheet event code, which means that it needs to be
    'placed in the appropriate worksheet code module, not a standard
    'code module. To do this, right-click on the sheet tab, select
    'the View Code option from the menu, and paste the code in.





    --
    HTH

    Bob Phillips

    "Reinhard Thomann" <reinhardt@thomann.com> wrote in message
    news:%2303K9Ru$EHA.3988@TK2MSFTNGP11.phx.gbl...
    > Hi,
    > how can i capture the right mouse button click event on a cell. I'd like

    to
    > enable/disable commands of the context menu in dependence to the selected
    > column.
    >
    > TIA
    > Reinhard
    >
    >




+ 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