asns
asked on
Sendkeys
Hi,
in my form there are 7 controls. how can I use Sendkeys to go through them like the Tab Key whenever i press Enter?
please give me a complete code showing the event where i use this property.
thanx
in my form there are 7 controls. how can I use Sendkeys to go through them like the Tab Key whenever i press Enter?
please give me a complete code showing the event where i use this property.
thanx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Just take in mind that it would set focus to every control in your form, not only text boxes.
Thanks for "A" grade.
Thanks for "A" grade.
The KeyPress event syntax has these parts:
Part Description
object --- An object expression that evaluates to an object in the Applies To list.
index --- An integer that uniquely identifies a control if it's in a control array.
keyascii --- An integer that returns a standard numeric ANSI keycode. Keyascii is passed by reference; changing it sends a different character to the object. Changing keyascii to 0 cancels the keystroke so the object receives no character.
if KeyAscii = 13 then sendkeys "{Tab}"