Thread: Focus
View Single Post
  #2 (permalink)  
Old 03-21-2008, 01:44 PM
Erel's Avatar
Erel Erel is offline
Administrator
 
Join Date: Apr 2007
Posts: 2,811
Default

You can use a code similar to:
Code:
Sub App_Start
    Form1.Show
End Sub


Sub TextBox1_KeyPress (key)
    If Asc(key) = 13 Then 
        textbox1.IgnoreKey
        button1_click
    End If
End Sub

Sub Button1_Click
    Msgbox(textbox1.Text)
End Sub
TextBox1 should be a MultiLine textbox.
Reply With Quote