Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 304
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default 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.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 304
Default 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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA userform questionS [email protected] Excel Discussion (Misc queries) 1 February 20th 08 12:07 PM
Three userform questions Chris Cred via OfficeKB.com Excel Programming 6 February 8th 06 08:35 PM
Two UserForm Questions FL Consultant Excel Programming 2 August 19th 05 09:03 AM
Further Userform questions Stuart[_21_] Excel Programming 9 March 25th 05 10:41 AM
Userform Questions Ligaya Excel Programming 1 November 24th 04 07:34 PM


All times are GMT +1. The time now is 03:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"