New line vs line break

  • Thread starter Thread starter jeffrey
  • Start date Start date
J

jeffrey

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
 
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
 
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.
 
Back
Top