Search code examples
excelvbatextbox

Text inside a textbox in Excel VBA userform expands horizontally


enter image description here

When I type text into my userform's textbox the text keeps going right non-stop and I can't see the whole text. I need it to go down automatically when the text length reaches the limit of the textbox.

The textbox's text keeps overflowing to the right and I need it to go to the next line when it reaches the limit of the textbox.


Solution

  • Use the property .Multiline = True with your TextBox.