![]() |
UserForm questions about text box propertys, thanks
I created a user form with a command button and text box.
1. When loaded, the command button is selected, how do you select the text box? 2. Will the cuser be blinking in the text box? 3. When the data is enter in the text box, how to get the "enter" button on the key board to be used? Right now, you enter the data and then have to click on the command button. Thanks. |
UserForm questions about text box propertys, thanks
1. You can use the userform_initialize event to select the control you want:
Option Explicit Private Sub CommandButton1_Click() MsgBox "Ok clicked" End Sub Private Sub UserForm_Initialize() Me.TextBox3.SetFocus End Sub 2. Test it and you'll see. 3. What do you want enter to do? Click the ok button? If yes, you can change the .Default property of the button you want to True. Either in Code: Me.CommandButton1.Default = True or while you're in design mode. pgarcia wrote: I created a user form with a command button and text box. 1. When loaded, the command button is selected, how do you select the text box? 2. Will the cuser be blinking in the text box? 3. When the data is enter in the text box, how to get the "enter" button on the key board to be used? Right now, you enter the data and then have to click on the command button. Thanks. -- Dave Peterson |
UserForm questions about text box propertys, thanks
1. Set the Tab order (view menu) so the textbox is at the top. 2. Yes 3. Set the Default property of the command button to true. -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware (Excel Add-ins / Excel Programming) "pgarcia" wrote in message I created a user form with a command button and text box. 1. When loaded, the command button is selected, how do you select the textbox? 2. Will the cuser be blinking in the text box? 3. When the data is enter in the text box, how to get the "enter" button on the key board to be used? Right now, you enter the data and then have to click on the command button. Thanks. |
UserForm questions about text box propertys, thanks
Awesome , to easy. Thanks!
"Jim Cone" wrote: 1. Set the Tab order (view menu) so the textbox is at the top. 2. Yes 3. Set the Default property of the command button to true. -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware (Excel Add-ins / Excel Programming) "pgarcia" wrote in message I created a user form with a command button and text box. 1. When loaded, the command button is selected, how do you select the textbox? 2. Will the cuser be blinking in the text box? 3. When the data is enter in the text box, how to get the "enter" button on the key board to be used? Right now, you enter the data and then have to click on the command button. Thanks. |
All times are GMT +1. The time now is 01:58 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com