Save key

T

Tony Jollans

Of course you can!

If you'd like to phrase your question in a way that can be understood, I'm
sure someone will try to help you. What is it you want to achieve?
 
C

Capn

Tony Jollans said:
Of course you can!

If you'd like to phrase your question in a way that can be understood, I'm
sure someone will try to help you. What is it you want to achieve?

--
Enjoy,
Tony



Thanks for replying. I want to run a macro loop where an object on the form is moved by the code chosen with Select Case vin, where vin holds a letter entered by the user. For example, when w is pressed the object to move up. I want the letter of the key pressed to be in vin without following the key press with Enter as is needed with an InputBox Help!
 
T

Tony Jollans

If I understand correctly, you should be able to use the Change event - but
I think a different sort of control might be more useful and probably easier
to work with, both for you and the user.
 
C

Capn

Tony Jollans said:
If I understand correctly, you should be able to use the Change event - but
I think a different sort of control might be more useful and probably easier
to work with, both for you and the user.
Thanks for your suggestion. The Change action seems to work only after a
change is made and Enter pressed. I will be away until Monday but I would
still like to pick your brains then. Would it be ethical to email you
directly? If not I will try to be more explicit in what I want to do.
Have a good weekend.
 
T

Tony Jollans

It would be better to communicate here at the moment - so others can see -
and correct me, if need be, or step into the breach. If you already have
something coded I am happy for you to send me a copy of it so we both know
what we're talking about.

On re-reading your post, I see you want to use an Input box, in which case,
no, I don't think you can do what you ask. What type of Form are you talking
about? I assumed it was a (VBA) Userform but I was probably wrong - maybe it
is what you want, though.
 
C

Capn

Thanks for the reply.
I thought I had it with the KeyUp command. I wrote a macro called Sub
Private EyeTest_KeyUp() where the first line is Stop. But when I open the
Word file named EyeTest.docx (a simple Word document) and press a letter it
does not go to the macro. Why not?

Bill
 
T

Tony Jollans

Documents don't have KeyUp events. There is no event that catches keystrokes
in Word. You would need to use Windows Key hooking for that and I don't have
code for that.
 
C

Capn

Many thanks for your expertise. I am disappointed, of course, but grateful to
you for keeping me from going nuts when it wouldn't work.

Capn
 

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