VBA for hovering over an object

andrewb90

Well-known Member
Joined
Dec 16, 2009
Messages
1,077
Hello,

Is there a way to use VBA to have a something happen when you hover over an object? Basically when I hover over the shape"quickview1" I would like that shape to hide and a new shape"quickview2" to appear. And then once you hovered off it would switch back. Is this doable or too crazy/complicated for excel?

Thanks,

Andrew
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hovering over is unfortunately, in my opinion, definitely too complicated. You can get the mouse position with a complicated API call but I currently don't understand API calls enough to be able to help with this.
Also even if you could get the mouse position, the best Excel can do to detect the hover is check the mouse position every second as far as I know. The problem with this is obviously that you can flash the mouse over an object quicker than a second and Excel may not capture it. Therefore your code becomes inconsistent.

Clicking the shape and having that do something however is something that I can definitely help with. Let me know if you'd like to go down the click instead of hover route.

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,215,759
Messages
6,126,728
Members
449,332
Latest member
nokoloina

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top