Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
Dynamically highlight the cell under the Mouse Pointer !
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="K Dales, post: 6009015"] The flickering is due to the delay caused by time it takes to run the code, especially in comparison to a short timer interval. I thought of a couple things to optimize the code somewhat in TimerProc (You can eliminate the With... End With, since you only use ActiveWindow once inside this loop; you can calculate .RangeFromPoint only once and assign that to another variable, you can eliminate the DoEvents here since you end the Sub right after it, and you can increase the timer interval a bit - one millisecond is much faster than the user can respond) - but while these could make a bit of improvement in the flickering nothing made it go away - and it seems that it is when the mouse moves to a new cell while the code is running, that is when the formatting gets messed up since the active cell changes before you can reset the format. In the end, after testing it and seeing where the delay is coming from, I believe it is caused by the call to GetCursorPos; and since that is a library routine there is nothing you can do to change that. Without the cursor position you can't highlight the cell, though, and I know of no easier or quicker way to find it than what you are doing here. So maybe I have helped define the problem a bit more, but afraid I can't offer a solution! [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
Dynamically highlight the cell under the Mouse Pointer !
Top