Question

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.

Was it helpful?

Solution

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

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top