Running macro on any key pressed event.

Premanshu

Board Regular
Joined
Oct 2, 2007
Messages
91
Hi,

Can anyone please advice me how to make a code so that it captures the event of pressing any key of the keyboard and triggers a macro.

I tried using OnKey method but the problem with this is I am getting stick to any particular button whichever i specify in the onkey method wheareas I want to keep it general for any button in the keyboard.

Also if anyone can suggest how can I use OnKey method to use the "S" key to launch a macro.


Please help

Regards,
Premanshu.
 
I haven't said how to do it - I was asking whether it would work for you first! :)
 
Upvote 0
:)> hmm sorry rorya.... I could not understand it.... As of now I am not too much sure about but yes I want to go ahead with it.... it seems to be the right thing I am searching for.....

Also request you to please ignore if I ask something stupid .. as I told you I am not very much versed with vba.

Thank you so much Rorya for your help and advice in advance :)>
 
Upvote 0

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