Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You could do it like this which detects the enter key being pressed
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) If KeyCode < 13 Then Exit Sub mysheet = "Sheet1" lastrow = Sheets(mysheet).Cells(Cells.Rows.Count, "A").End(xlUp).Row + 1 Cells(lastrow, 1).Value = TextBox1.Text End Sub Mike "NDBC" wrote: Thanks for the replys but neither are quite what I wanted. I can do what both examples do. That is put in the text box and have a button that does the command to store the entered data. What a want is a form with only the text box so that when you hit enter the data is stored. I don't want to have to either click on the button or press enter twice. Can this be done. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
User Form - Get Data From Drop List | Excel Discussion (Misc queries) | |||
User form Samples (to query data) | Excel Discussion (Misc queries) | |||
How can I make the cursor move down 8 cells each time I press ente | Setting up and Configuration of Excel | |||
How can I make the cursor move down 8 cells each time I press ente | Setting up and Configuration of Excel | |||
How do i fill the adjacent cell formulas in user form when i press | Excel Discussion (Misc queries) |