Text box question: How to force text to a single row in multiline textbox?

Jaymond Flurrie

Well-known Member
Joined
Sep 22, 2008
Messages
921
Office Version
  1. 365
Platform
  1. Windows
I have a form where user can add multiple records first to a text box one by one and then "flush" them into a database after he's done - just to avoid the need to open the form in worst case hundreds of time.

So my form looks basically like this:
textboxsingleline.png


It confuses the user way too much if a single "record" is spread into multiple lines. How do force my VBA code to print that text (ie. the content of that "Name") to a single line, while keeping the textbox as multiline?
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Set the Multiline property True and WordWrap False.

You'll need line feeds between rows.

Or you could use a ListBox.
 
Upvote 0
Set the Multiline property True and WordWrap False.

You'll need line feeds between rows.

Or you could use a ListBox.

Darn you shg. You make me feel pretty stupid with answer like this! :laugh: But yes, it works, thanks for the fast reply!
 
Upvote 0
Lucky guess. Glad it worked for you.
 
Upvote 0

Forum statistics

Threads
1,224,583
Messages
6,179,673
Members
452,937
Latest member
Bhg1984

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top