+ Reply to Thread
Results 1 to 3 of 3

Worksheet_BeforeLEFTclick or beforeMOUSE4 (middle mousebutton) click

  1. #1
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Worksheet_BeforeLEFTclick or beforeMOUSE4 (middle mousebutton) click

    Hi all,

    is there a way to get an event triggered in VBA on left click or mouse4 click on the worksheet?
    Thanks,

    Jasper

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,903

    Re: Worksheet_BeforeLEFTclick or beforeMOUSE4 (middle mousebutton) click

    There is nothing built-in so you'd be looking at API functions of some kind. Either subclassing the window (which is usually unstable), using low-level mousehooks, which requires a lot of processing and doesn't always work terribly well, or using some sort of message inspection on a timer. There is a recent post on another forum I frequent that seems to offer a stable method of intercepting mouse scrolling on worksheets that could possibly be adapted to work with different mouse buttons but I doubt it will be trivial (and I'm not allowed to post the link).
    Rory

  3. #3
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: Worksheet_BeforeLEFTclick or beforeMOUSE4 (middle mousebutton) click

    Was afraid of that, thank you - if you could PM me the link it would be appreciated.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 09-14-2016, 04:55 AM
  2. Replies: 3
    Last Post: 02-17-2015, 05:16 PM
  3. [SOLVED] How to convert First, Middle, Last name to Last, First Middle Initial with VBA
    By lwine in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-30-2013, 03:33 PM
  4. Replies: 0
    Last Post: 03-06-2013, 12:52 PM
  5. Extracting the Middle Initial/Middle Name
    By akwishestofish in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-16-2012, 11:13 AM
  6. Replies: 3
    Last Post: 03-09-2012, 03:19 PM
  7. Replies: 3
    Last Post: 04-30-2006, 03:53 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