How do you program something to respond to a keyboard command in a function?
Printable View
How do you program something to respond to a keyboard command in a function?
each control usually has a key_press, key_up, and key_down event that will allow you to place code in the sub that is called when the event happens
use the drop down combo boxes above the code window to find them
Then code what you want to happen
You have to think backward as to how you want to code - you are not waiting for a key press inside a sub - you are waiting for one outside and your codes STARTS on the event