Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using the enter key
I have a textbox and two commandbuttons on a userform. One of the buttons is
to unload the userform and the other is to add the contents from the textbox to a worksheet. I do not want to click the button everytime. I would just like to press the enter key to execute the code. I have looked every where to see how this is done but with no success. Any help will be much appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using the enter key
Hi SC,
Try: '============= Private Sub UserForm_Initialize() Me.CommandButton1.Default = True End Sub '<<============= --- Regards, Norman "sc" wrote in message ... I have a textbox and two commandbuttons on a userform. One of the buttons is to unload the userform and the other is to add the contents from the textbox to a worksheet. I do not want to click the button everytime. I would just like to press the enter key to execute the code. I have looked every where to see how this is done but with no success. Any help will be much appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to select cells in column enter data then press enter | New Users to Excel | |||
Enter multiple numbers in a cell so total shows when enter keypres | Excel Worksheet Functions | |||
Enter info in one sheet, auto enter in another based on one field | New Users to Excel | |||
What does hitting Ctrl + Shift + Enter to enter a formula do??? Help a n00b out. | Excel Worksheet Functions | |||
enter data on 1 sheet and make it enter on next avail row on 2nd s | Excel Discussion (Misc queries) |