CarlEOgden Posted February 21, 2004 Posted February 21, 2004 Hi, I've got the following code in the KeyPressed function of a Text Box:- Dim KeyAscii As Integer KeyAscii = Asc(e.KeyChar) If KeyAscii = Asc(ControlChars.Cr) Then Button1.Focus() e.Handled = True Me.Button1_Click() Exit Sub End If Me.Button1_Click() does work! What do I need so that when I press enter after entering some text to then execute the code in button1. Thanks for any and all help given. Carl. Quote
Leaders dynamic_sysop Posted February 21, 2004 Leaders Posted February 21, 2004 Button1.PerformClick() Quote
CarlEOgden Posted February 23, 2004 Author Posted February 23, 2004 Hi, Thanks for that, it's a bit ovbious! I'll try to open my eyes and read the drop down boxes better or read my book! Cheers, Carl. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.