+ Reply to Thread
Results 1 to 4 of 4

Detect mouse movement, Excel-VBA

  1. #1
    Registered User
    Join Date
    07-14-2020
    Location
    Kerala, India
    MS-Off Ver
    MS Office Professional Plus 2013
    Posts
    29

    Detect mouse movement, Excel-VBA

    There are no events generated in workbook or sheet when mouse moves over an excel window. But it is obvious that excel 'reads' mouse movement since we can attach a comment to a cell and display it when mouse hovers over that cell.

    What is the simplest way to continuously monitor the mouse movement and display it in a cell? It is possible to get the mouse cursor position using GetCursorPos DLL function but it needs to be called every time the mouse moves and there is no way to know when mouse moves.

    Regards,
    Pravin Kumar.

  2. #2
    Valued Forum Contributor
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (24 H2) 64 Bit
    Posts
    1,187

    Re: Detect mouse movement, Excel-VBA

    That needs of using a lot of API calls for subclassing Excel window and at the end, the code may not be stable while working for different versions of Excel architecture and OS.

    But if you can tell why you need this, different alternatives may be offered to you.

  3. #3
    Registered User
    Join Date
    07-14-2020
    Location
    Kerala, India
    MS-Off Ver
    MS Office Professional Plus 2013
    Posts
    29

    Re: Detect mouse movement, Excel-VBA

    I am trying to use solver for solving a physics problem. For defining the problem I want to create a picture with the object parameters. Capturing mouse movement is to create the picture.
    Last edited by jeffreybrown; 07-14-2020 at 09:52 AM. Reason: Please don't use full quotes!

  4. #4
    Registered User
    Join Date
    07-14-2020
    Location
    Kerala, India
    MS-Off Ver
    MS Office Professional Plus 2013
    Posts
    29

    Re: Detect mouse movement, Excel-VBA

    I do not feel that this thread will not receive much attention though this thread is not exactly solved. I would like to pose the question in more precise words. But, kindly tell me, how I would mark this thread as solved?

    Thanks for the help.

+ 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. VBA code to detect mouse movement run a certain code.
    By Kelly mort in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-27-2019, 05:19 AM
  2. [SOLVED] Record mouse movement
    By papasmurfuo9 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-21-2014, 08:55 AM
  3. Run if no mouse movement/activity
    By Subject_Name_Here in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-15-2013, 09:04 AM
  4. Convert This Series of Mouse Movement to Excel Macro
    By rickyou in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-23-2011, 12:20 PM
  5. Excel cell mouse movement problem
    By mdreyas in forum Excel General
    Replies: 2
    Last Post: 01-31-2007, 10:36 AM
  6. Mouse movement over a worksheet
    By Edward Ulle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-05-2006, 04:35 PM
  7. Mouse movement on worksheet
    By InExcelHell in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-11-2005, 12:06 AM

Tags for this Thread

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