By using expertatexcel.com you agree to our cookie policy, We and our partners operate globally and use cookies, for multiple purposes

Become an Σxpert at Σxcel.com

 


_ - continuation character

In VBA code you can make your code more readable by breaking up long lines into shorter ones

a = "this is a very long string that can be separated " & _
"by the _ (underscore) symbol " & _
"Hope you liked it."

Note that there isn't a carriage return added added to the code. To do that add vbCRLF and it will look the following:

a = "this is a very long string that can be separated " & vbCRLF _
"by the _ (underscore) symbol " &  vbCRLF _
"Hope you liked it."