Comments textbox within a userform

MTBer

Board Regular
Joined
Apr 29, 2004
Messages
207
I'm putting together a userform and the users have requested a textbox into which they can just add comments/notes. I set up a largeish text box but all the keyed text is just added as one long sentence, is it possible to write effectively short paragraphs and points into the the textbox and if so how do you pass them back to excel.

cheers,
Paul
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

parry

MrExcel MVP
Joined
Aug 20, 2002
Messages
3,355
Hi Paul, right click the textbox and select properties. Amend these properties as follows:-

EnterKeyBehaviour = True
MultiLine = True
WordWrap = True

This will allow the user to press enter to get another line and word wrap the text. I cant remember the limits but you may be limited to 256 characters in the textbox even though a cell can actually hold more. To place a value into the cell create a command button and for the click event for the control have somehing like this substituting Commandbutton1 & TextBox1 to suit the names of your controls.

Code:
Private Sub CommandButton1_Click()
'Place textbox value into cell A1 on sheet1
Sheets("Sheet1").Range("A1").Value = Me.TextBox1.Value
End Sub
[/code]
 

Forum statistics

Threads
1,148,051
Messages
5,744,520
Members
423,881
Latest member
Nguyen Vu

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
Top