Free Microsoft Excel 2013 Quick Reference

Carriage return in a text box Results

Hi All,

Is it possible to have a carriage return in a text box on either a form or a report? I have a small report built into one textbox, but the names are of varying lengths and I would like a consistent look, with a few carriage returns in the text box.

Regards,

Bill

Maybe there is a more brilliant way to go about this, but this is what I am trying to do.

I have made a small version client relationship manager.

One of the users always likes to save his email messages that he sends, so what he does is right the email then he has to copy and paste the email into a text box to save the message for that contact.

My idea was to have him write the message in a textbox first, then I can load the email body with the textbox, which was successful and save the message automatically to that contact.

The only problem is that when you hit enter to try to get a carriage return in the text box, it leaves the text box. Is there anyway to hit enter or have a carriage return in a text box.

Secondly, is it possible to maybe embed a word editor with some tools (bold, italicize, font change) into an excel form?

thank you for any help

Josh

Have a cell defined as GENERAL with wrapped text. How can I put a carriage
return in the middle of my wrapped text and start a new paragraph, all in
one cell.

Hello,

I'm trying to figure out how to force text to wrap within a text box in Excel 2007. Note: this is a text box on top of a graph -- nothing to do with cells.

I have tried Insert > Text Box and then typing my text. But contrary to what I have read on line, the default behavior (that I am seeing) is that typed text just ignores the boundaries of the text box, extends infinitely to the right, and doesn't wrap at all (unless I manually insert a carriage return).

How can I force it to wrap within my text box?

Thanks!

Jay

I know there's a similaur forum just ahead of mine, but I felt this was different enough to start a seperate thread.

I have a user form with a large text box, amoung other fields, that has the EnterKeyBehavior set to True so the user can have multiple lines in the field. I have an option to "print" the notes and other fields which creates a sheet for the user to view and print if they want to. The text box entry goes to a large group of merged cells set to word wrap. If the user does input multiple lines, the resulting 'returns' are shown as those pesky rectangles. I'd like to avoid this as it is less that fashionable for the formality of the printable sheet.

any help please? thanks!

Good Morning All,

I have been using Chr(10) to insert carriage returns in strings which I can then display in text boxes on a userform. Unfortunately since I've been upgraded to XP I no longer have the ActiveX add-in which my PC tells me is the missing library.

Does anyone know how to insert carriage returns without using Chr ?

Thanks

John

Hi people,

I'm slowly building up our office tech inquiry template and adding new features as I find ways of making them work. The latest is as follows...

The sheet asks the employee to type in the customer's enquiry into a text box. Further down the employee's response is typed in another text box. Clicking on a command button opens up Outlook and the intent is that the HTML body would read as follows:

On (date) you contacted (Employee) with the following inquiry:
***note spare line - carriage return - here [is this a double carriage return?]***
(inquiry from text box 3) - I would like this (inquiry text) to be in italics
***another vacant line***
Our organisation has the following response to this inquiry:
***vacant line***
(response from text box 8) - possibly bold for this text
***vacant line***
We thank you for your inquiry.
***vacant line***
Organisation name

This is the relevant piece of code I have at present (note *CR* means where I would put carriage return):
With OutMail
.To = TextBox6.Value
.CC = ""
.BCC = ""
.Subject = "MRWA response to your enquiry on " & ComboBox9.Value
.HTMLBody = "On " & Sheets("Technical Inquiry Form").Range("J1").Value & _
" you contacted Main Roads' " & ComboBox2.Value & " with the following inquiry:" & _
*CR* TextBox3.Value.font.italic & *CR* & "Our organisation has the following " & _
"response to your inquiry:" & *CR* & TextBox8.Value.font.bold & *CR* & "We " & _
"thank you for your inquiry." & *CR* "Organisation name"
.send 'or use .Display
End With

One other thing is that each text box has word wrap as TRUE and a vertical scroll bar. Typing the following in the text box...

We agree with your comments and will make the changes.

Regards
Mike

....come out in the HTML body as ....

We agree with your comments and will make the changes.Regards.Mike

Thanks for any assistance.
Mike

Hi There All

I am concatenating data which will be displayed in a text box.
Is there any way to force a carriage return within the formula ?

Ta very.

I want to concatenate two strings in a worksheet to be used in a text box in
a chart however I would like the two strings to appear on seperate lines in
the text box. Is there a way to insert a carriage return between the two
concatenated strings in the worksheet?

Excel 2002
Windows XP Pro SP2

I've tried vbcrlf but that just places the "p" looking carriage return
character in my string. Here is the gist of what I want:

OUTPUT = "The Input value is " & VAL & vbCrlf & _
"The Input units are " & INP & vbCrlf & vbCrlf

txtbx2.Value = OUTPUT

Any ideas?

-gk-

=================================================
The creative act is not the province of remote oracles or rarefied geniuses
but a transparent process that is open to everyone.
-Greg Kot in Wilco Learning How To Die-

Hi folks
I have a text box (from the drawing toolbar) that contains text. This sometimes includes carriage returns.
I am trying to come up with some code that copies the text box to a cell before the worksheet gets saved as a text file. This text file later gets imported into a different worksheet and the text within the cell goes into another text box.
The code I have so far is
Sheets("Results").Select
ActiveSheet.Shapes("Text Box 39").Select
Sheets("Export Sheet").Range("E1") = Selection.Characters.Text
Sheets("Export Sheet").Select
Range("E1").Select
    With Selection
        .HorizontalAlignment = xlGeneral
        .VerticalAlignment = xlBottom
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
     End With
This works ok if there are no carriage returns in the text, but when there are they get copied to the cell as squares. When the text file is imported back into the new spreadsheet things go wrong and the text gets split into different cells.
Does anyone have any solutions to this?
Someone suggested the text should be in rich text format but I don't know anything about that.
I hope this makes sense and someone can help!
Thanks,
Jonathan.

I am fairly new to Excel!

I have asked this question before - but it was my fault I never asked the question properly!!

I recieved 2 replies - but the answers resulted in truncating the text - I would like to retain the mutliline format.

I have created a UserForm with a Text box on it. The text box is set to use mutliLines and to use the Enter key to create the new line.
When I send the data to the speadsheet - I end up with a Carriage return (square) and the end of each line - which is also seen when you print the sheet (not what I want).
I want to keep the format (like when you use Alt/Enter in the cell) and keep my multiple lines in the cell - but I would like to loose the Carriage return, and replace it with something (like a space?) that would keep the format.
I would like to do this using VBA (if poss).
I hope someone can help?

I need to "scrub" text entered into a text box. By "scrub" I mean that I want to remove certain unwanted characters and formatting. My code (below) effectively removes all unwanted characters, but certain carriage returns, etc., are not removed. Any suggestions?

To test the code, I go to the following website: http://shakespeare.about.com/library.../aa011801a.htm, press cntrl-A to select all text, copy, and then paste from clipboard into a textbox in a userform. This is first few lines of the output:

" You are here:About>Homework Help>ShakespeareHomework HelpShakespeareEssentialsShakespeare FAQsQuotationsSoliloquy AnalysisElizabethan Glossary Shakespeare TimelineShakespeare OffersShakespeare Plays Shakespeare Movie BBC Shakespeare Shakespeare Videos William Shakespeare What are offers?Articles & ResourcesStudent "

Note that the there is a hard-return after "Homework" on the first line. I need to remove this. The text needs to end up as one large paragraph with no carriage returns, paragraphs breaks, etc....
___________________________
The code (userform, textbox1,commandbutton1)

Private Sub CommandButton1_Click()
Dim original_text, Revised_text, chk_char, firsts_string As String
Dim Character_count As Integer
original_text = TextBox1.Value
'
'
'Clean Text
Character_count = Len(original_text)
For i = 1 To Character_count
chk_char = Asc(Mid(original_text, i, 1))
If chk_char > 31 And chk_char < 126 Then
Revised_text = Revised_text & Mid(original_text, i, 1)
End If
Next i
TextBox1.Value = Revised_text

End Sub

___________________________________

I know Excel pretty well, but am just getting to grips with VBA, and am
stuck on this problem.

I am receiving enquiries from a web form which are ending up in my email
inbox. I then copy these details (the usual stuff: name, address, telephone
etc) into cells in a spreadsheet. I've been doing this by manually copying
and pasting but I'm looking for a way to speed this up, and learn some VBA
in the process.

My thought was to copy and paste the email text/data into a text box in a
userform, then hit a button to parse the data into a spreadsheet (or perhaps
as a halfway house, just split the data up and insert it into text boxes on
the same form. I know how to update a worksheet from individual
textbox/fields).

The block of text to be parsed contains the labels like "name:" , "address:"
, "email:" etc to preface the user data, though not all of these are
compulsory, so they don't always appear. Each lump of data is separated from
the next label with 3 carriage returns.

Could someone suggest an approach to this please, or even a pointer to a web
page that might help? I've done some general searching but nothing quite
answers the question.

Thank you.

I am trying to CONCATENATE some text but I need the information to be put into 2 separate rows. How can I do a hard carriage return.

thank you

Hi All,
In the past everyone has been very fast and helpful with my problems so thanks for that!

I have a new issue which google can't seem to answer, I have a Multi-line text box in a form which populates a merged will with its content, however it also adds the Carriage Return symbol (Square) into the cell, can anyone tell me how to fix this to stop it from being entered, or how I would go about parsing the entry of that particular symbol?

Thanks,
Chris

I have some data which is importing in from an application called Oracle Discoverer into an Excel spreadsheet. It imports carriage returns symbols which appear as small boxes between text. I have tried Find and Replace to try and remove them but it does not recognize the carriage return symbol boxes.

Is some way of removing these symbols in a macro?

There are also duplicate rows, is there some way of removing these in a macro too

Thanks in advance

Des

I wrote (well modified someone elses) code which uses a multiline enabled text box on a userform to input data into a database.It's pretty simple and works fine on my laptop running Excel 2002 SP3. My problem is that when I run the same userform on my the target machine at work an extra character appears at the end of each new line (a square box).

I know I could probably remove the extra character but I was wondering if this was a known problem? My work machine is running Excel 2002 with SP2.

Could there be some setting somewhere in excel that is doing this? I can manually remove the square symbol and the carriage return
/line feed still works.

Any thoughts on why this is happening or indeed how to remove the extra character would be appreciated.

I thought this deserved a topic of its own, although I made a post for the same doubt in an unrelated thread on the forums:

If I have a workbook with graphics (i.e. every worksheet has a standard header with the company logo etc.), but in the rest of the worksheet I have a range of data which I want to export as a text file, is it possible?

I want to export a particular range in a worksheet to a text file (the range may contain dates as a data type too), and save that text file (for simplicity, in the same folder as the workbook...but I'd like it if it throws open a "Save As" dialog box!).

It'll be nice if the columns are tab space and the rows have a carriage return separating them.

(I tried recording a macro, but it said this kind of sheet is not compatible or something along those lines).

Greetings all !

I have used a user form to take userinput. The user "cut and paste
data from another window. The text box is formatted to warp text an
take multi line input

While saving in excel the Carriage returns are showing as contro
characters.

As such it is not giving any problems when the user does not cut extr
blank lines. If they cut extra blank lines (say 4 blank lines) at th
end of the data there are 4 squares (control characters). I trie
doing a find and replace and excel is not finding this character.

I need solution for this problem:

I want to remove the extra line feeds/carraige returns at the end
automatically.

1. Is there a function by which I can do it ?

2. How to read the last few characters in that cell and check whethe
it contain the carriage return.

3. I cannot do a global find and replace in that cell because th
other carriage return also would get replaced and all the line spacin
would be lost.

4. How to loop to check all the cells in that column ?

Thanks in advanc

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com


No luck finding an answer? You could always try Google.