Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
populating a cell with text w/ line breaks
Joe
In XL2003 this worked Sub test() ActiveCell.Value = "Ben" & Chr(10) & "Hur" & Chr(10) & "Gladiator" End Sub -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England HIS "Joe" wrote in message ... I am using XL 2002. I need to populate cells with data that has been created using the vbcrlf constant (i.e. data value = "Ben" & vbcrlf & "Hur" & vbcrlf & "gladiator"). When I populate the cell with the data value above it appears double spaced, like this: Ben Hur gladiator I want it to apepar like this: Ben Hur gladiator What is the vb constant used to create the Alt+Enter line break while populating a cell? TIA, -- Joe VBA Automation/VB/C++/Web and DB development |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
populating a cell with text w/ line breaks
I have always used "vbCR" instead of "vbCRLF". Does the
"vbCRLF" add an additional line feed?? -----Original Message----- Joe In XL2003 this worked Sub test() ActiveCell.Value = "Ben" & Chr(10) & "Hur" & Chr(10) & "Gladiator" End Sub -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England "Joe" wrote in message ... I am using XL 2002. I need to populate cells with data that has been created using the vbcrlf constant (i.e. data value = "Ben" & vbcrlf & "Hur" & vbcrlf & "gladiator"). When I populate the cell with the data value above it appears double spaced, like this: Ben Hur gladiator I want it to apepar like this: Ben Hur gladiator What is the vb constant used to create the Alt+Enter line break while populating a cell? TIA, -- Joe VBA Automation/VB/C++/Web and DB development . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
populating a cell with text w/ line breaks
Hi SidBoard,
From Help: 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) --- Regards, Norman "SidBord" wrote in message ... I have always used "vbCR" instead of "vbCRLF". Does the "vbCRLF" add an additional line feed?? -----Original Message----- Joe In XL2003 this worked Sub test() ActiveCell.Value = "Ben" & Chr(10) & "Hur" & Chr(10) & "Gladiator" End Sub -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England "Joe" wrote in message ... I am using XL 2002. I need to populate cells with data that has been created using the vbcrlf constant (i.e. data value = "Ben" & vbcrlf & "Hur" & vbcrlf & "gladiator"). When I populate the cell with the data value above it appears double spaced, like this: Ben Hur gladiator I want it to apepar like this: Ben Hur gladiator What is the vb constant used to create the Alt+Enter line break while populating a cell? TIA, -- Joe VBA Automation/VB/C++/Web and DB development . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Wrapping text with line breaks problem | Excel Discussion (Misc queries) | |||
Text to Columns with Line Breaks. | Excel Discussion (Misc queries) | |||
Inserting line breaks in text formula | Excel Discussion (Misc queries) | |||
remove line breaks in text strings | New Users to Excel | |||
Can you get line breaks in a text cell | Excel Discussion (Misc queries) |