Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi all, in the userforms i've created, I've always had a user put data into textbox and then click a command button to do whatever the comman button does. However, In the userform that i'm creating right now, i'd like for th user to put data into the textbox and just press enter and have m operations carried out instead of having to click a command button. Ho can this be done? thanks for the help : -- abx ----------------------------------------------------------------------- abxy's Profile: http://www.excelforum.com/member.php...nfo&userid=473 View this thread: http://www.excelforum.com/showthread.php?threadid=26554 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() You can use the keydown event to check for an enter. Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger ByVal Shift As Integer) MsgBox KeyCode If KeyCode = 13 Then 'Your code here End If End Sub You may also want to check for a Tab (KeyCode=9) if they would ever ta out. Also might need to use TextBox1_Exit event if they mouse out. -- kkkni ----------------------------------------------------------------------- kkknie's Profile: http://www.excelforum.com/member.php...nfo&userid=754 View this thread: http://www.excelforum.com/showthread.php?threadid=26554 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Textboxes | Excel Discussion (Misc queries) | |||
tab between several textboxes | Excel Worksheet Functions | |||
Textboxes | Excel Programming | |||
textboxes | Excel Programming | |||
Userfrom textboxes | Excel Programming |