define UserForm properties

J

Jacy Erdelt

I have created a UserForm and I am trying to change the properties of a text
box. Some of the names you can derive the meaning of (ie:BorderStyle), but
there are many that I don't understand what they do (ei:EnterFieldBehavior).
The choices offered in the drop down box do nothing to explain
(ie:1-fmFieldBehaviorRecallSelection). Maybe I am dense, but that doesn't
help understand what my options are. I have searched everywhere that I can
think to find the definitions of these properties, with no luck. Is there a
place I can go to find the definitions of the UserForm and object properties?

If there is no such place, would you be able to tell me what I need to
accomplish the immediate task at hand? What I would like it to do is
automatically tab to the next TextBox in the line once a value has been
entered in the 1st box (there are 7), then when something is inputted into
the 7th box it will automatically tab to the CommandBox, where the user can
hit enter to submit (instead of having to click on it).
 
R

Rick Rothstein

You can get help on any property by clicking on the property word itself
(that is the word in the left column) in the Properties window and then
pressing F1.

The EnterFieldBehavior property determines whether any existing text in a
TextBox will be selected or not when that TextBox receives focus.

The EnterKeyBehavior property determines what the Enter key will do in a
TextBox that has its MultiLine property set to True. For that kind of
TextBox, setting it to True means pressing the Enter key will create a new
line and setting it to False means pressing the Enter key will move focus to
another control (the TabIndex is used to determine which control that is).
If the TextBox's MultiLine property is False, then pressing the Enter key
will always move focus to another control. As for setting the order the
controls are visited in, you can press View/TabOrder and use its dialog box
to arrange the controls in the proper order.
 
J

Jacob Skaria

Hi Jacy

In addition to what Rick mentioned you can set the 'Default' property of
Commandbutton to True; so that Enter key from the form will trigger the
commanbutton.

If this post helps click Yes
 
R

Rick Rothstein

I originally thought of mentioning that, but then realized it would get in
the way of what the OP wanted to do... have the Enter key move the focus
from TextBox to TextBox in sequential order. Setting the Default property to
True would activate the CommandButton as soon as the OP hit the Enter key
even if he were in the first TextBox at the time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top