'set the keypreview to true
'in the keypress event of the textbox
if e.keycode = keys.enter then
button1.performclick
end if
private sub textbox_keyup (blah...blah) handles textbox.keyup
if e.keycode = keys.enter then button1.performclick
end sub