views:

341

answers:

2

In a textbox of a userform in VBA, I would like to enable the feature where the user can add a new line in the textbox by pressing the "Enter" key on the keyboard. However, I had trouble finding a UI option in the UI editor to achieve this. Is this even allowed in VBA userforms? Thanks in advance for the advices and answers.

A: 

have you tried incorporating the rich text control for text? Not sure how well it works with VBA, but in VB6 this is what I would use.

ScaleOvenStove
+3  A: 

Set textbox's MultiLine property to True and EnterKeyBehavior to True.

shahkalpesh
Thanks. It worked well.
stanigator