Quantcast
Channel: Eureka! » VBA
Viewing all articles
Browse latest Browse all 2

VBA – Newline Character

$
0
0

In VBA, there is 3 types of Newline characters.

  • vbCr – Carriage Return CR
  • vbLf – Line Feed LF
  • vbCrLf – Carriage Return CR + Line Feed LF

Different Newline characters are for different OSs.
Linux and Mac OS X use LF
Windows uses CR + LF
Mac OS and Apply II family use CR.

You can append a Newline character by simple concatenation.

Private Sub CommandButton1_Click()
    Range("A1") = "1st" + vbCrLf + "2nd"
End Sub

 

See what u get!

 

Done =)

Reference:


Filed under: VBA Tagged: Linux, Mac, Postaday2011, VBA, Windows

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images