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

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
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]
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,255
Members
449,075
Latest member
staticfluids

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