KeyDown Event Question

G

Guest

Hello,

I know with VBA Code you can trace what is being entered into a Control with
the KeyDown Event and then with KeyCode...

Private Sub TextBox1_KeyDown(KeyCode As Integer, Shift As Integer)
msgbox KeyCode
End Sub

I also know that in the PROPERTIES of the Control you have On Key Down where
you can assign a Function to there to do something.

What I would like to know is when using the Properties On Key Down, not VBA
code, how can you pass the KeyCode & Shift, know what is being pressed down
so then I can work with it in a Function? Or can this not be done, only with
VBA code ?

Any help would be greatly apprecitaed.

Thank you,
Jeff
 
B

Brendan Reynolds

The latter - you need to use a VBA event procedure in order to access (no
pun intended) built-in event arguments such as KeyCode and Shift.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top