6

I need some help with my textbox. My Textbox content is being fed by a cell value. Now the construction of the cell value goes like this: "(date comments)" and it happens progressively, i can have multiple entries like that.

Basically i want my textbox to display each value as a single line in the textbox in my user form to make them appear like a bullet list.

is this possible? I'm thinking of detecting each closing parenthesis sign ")" then make it go to next line? but i cannot put my finger on how to actually code it.

1 Answer 1

14

Set the multiline property of the textbox = true

And you may have to set the ScrollBars property to 2-frmScrollBarsVertical

Then separate the values by a vbCrLf

"somecomment" & vbCrLf & "somecomment" & vbCrLf & "somecomment"

These are the options for newlines depending on what you are doing.

Constant    Equivalent          Description
vbCrLf      Chr(13) + Chr(10)   Carriage return–linefeed combination
vbCr        Chr(13)             Carriage return character
vbLf        Chr(10)             Linefeed character
vbNewLine   Chr(13) + Chr(10)    or, on the Macintosh, Chr(13)  Platform-specific new line character; whichever is appropriate for current platform
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.