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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do you make a new form load by pressing bottons not in the list

Status
Not open for further replies.

Blobishthing

Programmer
Feb 16, 2002
23
AU
i am making a program but i cant work out how to make a new form load when i press left or right arrow button or a letter or something
Thanx in advance
 
I use code like this. In this example, I test for the RETURN key, but it could easily be any letter. Also, I think the textbox I refer to could be any other object.

Private Sub MyTextbox_KeyPress(KeyAscii As Integer)

'If RETURN is pressed, load a Form
If KeyAscii = 13 Then Load MyForm

End Sub

For the mouse instead of a keypress, try MouseDown or MouseUp events
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top