Transfer data from userform textbox to sheet

rhombus4

Well-known Member
Joined
May 26, 2010
Messages
586
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
On a userform when I transfer a standard textbox to a cell it transfers ok (Range("C3").Value = TextBox1)

However if I want the text box to be wrapped, i.e. change Multiline to True and EnterKeyBehaviour to True it transfers the data differently with speechmarks

Any ideas??
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
This is what i get..
[FONT=&quot]A multiline TextBox allows absolute line breaks and adjusts its quantity of lines to accommodate the amount of text it holds. If needed, a multiline control can have vertical scroll bars.[/FONT]
[FONT=&quot]A single-line TextBox doesn't allow absolute line breaks and doesn't use vertical scroll bars.[/FONT]
[FONT=&quot]For controls that support the MultiLine property as well as the WordWrap property, WordWrap is ignored when MultiLine is False.[/FONT]
[FONT=&quot]Single-line controls ignore the value of the WordWrap property.[/FONT]
[FONT=&quot]If you change MultiLine to False in a multiline TextBox, all the characters in theTextBox will be combined into one line, including non-printing characters (such as carriage returns and new-lines).[/FONT]
[FONT=&quot]The EnterKeyBehavior and MultiLine properties are closely related. The EnterKeyBehavior values of True and False only apply if MultiLine is True. IfMultiLine is False, pressing ENTER always moves the focus to the next control in the tab order regardless of the value of EnterKeyBehavior.[/FONT]
 
Upvote 0

Forum statistics

Threads
1,215,491
Messages
6,125,107
Members
449,205
Latest member
ralemanygarcia

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