I'm using Excel 2010.
This seems like a fairly basic function, but I'm having trouble getting it to work the way I intend.
I have a string variable that is being passed through to the body of an email. There are different pieces of information stored in named ranges of the Excel file that need to be passed through to the variable, and there should be a new paragraph when each section begins.
Below is the code I have, but it is not working. What am I doing wrong?
Thanks!
Doug
This seems like a fairly basic function, but I'm having trouble getting it to work the way I intend.
I have a string variable that is being passed through to the body of an email. There are different pieces of information stored in named ranges of the Excel file that need to be passed through to the variable, and there should be a new paragraph when each section begins.
Below is the code I have, but it is not working. What am I doing wrong?
Code:
strBodyText = Range("Greeting") & vbCrLf & Range("Body1") & vbCrLf & Range("Body2") & vbCrLf & Range("Sig")
Thanks!
Doug