Key Click Event

P

Patrick

How could I make my form so that when a certain button is pushed, such as
enter, a macro or event proc. will run?
 
D

Dirk Goldgar

Patrick said:
How could I make my form so that when a certain button is pushed,
such as enter, a macro or event proc. will run?

No matter where on the form that button is pushed? If you set the
form's KeyPreview property to Yes, then you can use the form's KeyDown
or KeyPress event (which ever is appropriate) to check what key was
pressed and take whatever action you want.
 
Top