vba userforms carriage return behavior
19,790
Set textbox's MultiLine property to True and EnterKeyBehavior to True.
Author by
stanigator
Updated on June 13, 2022Comments
-
stanigator almost 2 years
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.
-
Xosofox over 8 yearsNote: Someone might want to consider TabKeyBehaviour = true in case you want to allow entering [TAB] as well instead of hopping to the next control. Not related to the question, just saying...