I want to spread a string across multiple lines if it's longer than 40 characters.
In case the string is too long, the last word should have a vbCrLf inserted before it, so it appears on a new line. It's like what Word does when you're writing something and it won't fit on that line, so it brings the whole word on the next line.
As a final result, the string should have vbCrLf's inserted in the appropriate places.
So say the string was: "AAAAAA BBBBBBBB CCCCCC DDDDDDDDDDDDD"
The new string should be: "AAAAAA BBBBBBBB CCCCCC" & vbCrLf & "DDDDDDDDDDDDD"
How can I do this?