Possible to get MouseUp event on a worksheet?

Posted on 2012-08-28
Last Modified: 2012-09-04
Hello - is there a way to do this on a worksheet (not a chart) in Excel 2010 ?

I have worked with Windows API calls in Access app's before, so if that's how it's done, then I would just like to know... that that's how it's done... and maybe see an example... or a code snip...

Question by:mlagrange
    LVL 44

    Assisted Solution

    by:Martin Liss
    The events available on a worksheet are limited and MouseUp is not one of them.

    You could however put an ActiveX textbox or other control on the sheet or on a userform. Note that some advise against ActiveX controls on sheets, but if you choose that method you can add code to avoid any problems that might occur.
    LVL 85

    Accepted Solution

    FWIW, you can use APIs to subclass the excel window and intercept mouse messages but it's generally not that stable and I wouldn't recommend it.

    Author Closing Comment

    Thanks to both of you. I am beginning to wish I had done this with UserForm's, and I particularly needed to hear about possible stability problems.
    Thanks again
    LVL 44

    Expert Comment

    by:Martin Liss
    You're welcome and I'm glad I was able to help.

    Marty - MVP 2009 to 2012

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    I've recently been in need of an Excel macro that could add a letter before the text on multiple cells in an Excel document. My English is as it is, so I will try explain what it does diffrently. If you have an excel document with 2000 rows an…
    Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
    The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
    Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now