Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

execute keyboard command from VB 1

Status
Not open for further replies.

jramrus

Computer
Jan 18, 2004
1
I would like to execute a keyboard command such as a 'tab' or a 'return' or be able to enter a character into a textbox on the screen. This would be for Windows XP or like OS.

Thanks
Jordan
 
Replies continue below

Recommended for you

This is done by the SendKeys method.

Cheers,
Joerd

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
To execute tab you write
Sendkeys ("{TAB}"),true

To execute return,
Sendkeys ("~"),true
 
Joerd,
In order to use SendKeys, do you not need a file called KEYPUSH.DLL?

Bradley
 
Dunno, but it's not on my system (W2k)

Cheers,
Joerd

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
I don't think you need that DLL. SendKeys is an intrinsic command to VB.

In conjunction with the AppActivate command, you can also use SendKeys to send keystrokes to other applications as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor