Reputation: 2149
I created a form in Excel 2003 using a tutorial online but I had a different use case and now have run into a minor problem. I know very little VB and my searches have not produced anything helpful. I have a text input field and it won't wrap the text which would be preferred so the user can see what he/she wrote to prof read or edit before submitting. My guess is this code block requires something to specify that the text should wrap in that text box. Thank you in advance for any help you can provide.
Private Sub txtopportunity_Change()
End Sub
Upvotes: 1
Views: 1735
Reputation: 5439
You don't have to do this in code. You can set the textbox to always wrap like this:
In Designer mode right click your text box and open it's 'Properties' One of the peoperties is called 'WordWrap' Set it to True. AND set the 'MultiLine' property to True
If you really need to enable/disable this via VBA it would look something like
Me.txtopportunity.WordWrap = True
Me.txtopportunity.MultiLine = True
Upvotes: 4