Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski 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
Joined
Jan 18, 2004
Messages
1
Location
US
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
 
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

Back
Top