Run a Macro with a KeyPress on Mouseover

kgklinks

New member
Local time
Today, 03:24
Joined
Aug 9, 2012
Messages
1
Hey all,

I'm currently trying to make a Powerpoint presentation that will run my macros when I hover the mouse over a shape and then press a key on the keyboard.

right now all my macros work fine, but they're programmed to work on a mouse click. It seems like this should be one or two lines of code but so far it looks like it will be more complicated than that. Here's what I was expecting it to look like (sort of...):

Sub ArrowControl()
' wait until Right Windows button is pressed, and then run macro
If RWin.IsPressed Then
...
...
...
End If
End Sub

So really what I want is for it to wait while the mouse is hovering over the shape until the Right Windows (RWin) key is pressed (or more specifically on KeyUp) and then run the macro.

I would very much appreciate help on this! I am relatively new with VBA

Thanks in advance,

-a guy with hurting eyes
 

Users who are viewing this thread

Back
Top Bottom