ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   New line vs line break (https://www.excelbanter.com/excel-programming/445281-new-line-vs-line-break.html)

jeffrey

New line vs line break
 
I'm looking for an alternative to newLine. Currently my code is
written as:
mySheet.getRange("F5").getValue() + newLine +
mySheet.getRange("F6").getValue() + newLine + etc...

Instead of newLine, I just want a line break. newLine is equivalent
to <p in HTML, but I am looking for something like <br. How can I
do that?

Jeffrey

Vacuum Sealed

New line vs line break
 
On 21/01/2012 10:26 PM, jeffrey wrote:
I'm looking for an alternative to newLine. Currently my code is
written as:
mySheet.getRange("F5").getValue() + newLine +
mySheet.getRange("F6").getValue() + newLine + etc...

Instead of newLine, I just want a line break. newLine is equivalent
to<p in HTML, but I am looking for something like<br. How can I
do that?

Jeffrey


Hi Jeff

try

mySheet.getRange("F5").getValue() & Chr(10) & _
"" & Chr(10) & _
mySheet.getRange("F6").getValue() & Chr(10) & _
etc..

HTH
Mick

GS[_2_]

New line vs line break
 
After serious thinking jeffrey wrote :
I'm looking for an alternative to newLine. Currently my code is
written as:
mySheet.getRange("F5").getValue() + newLine +
mySheet.getRange("F6").getValue() + newLine + etc...

Instead of newLine, I just want a line break. newLine is equivalent
to <p in HTML, but I am looking for something like <br. How can I
do that?

Jeffrey


vbNewline is a combination of 'carriage return' + 'line feed'
(vbCr+vbLf), and is equivalent to vbCrLf. So the vbLf is what you want.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc




All times are GMT +1. The time now is 08:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com