VBA code for new line using OLAppointment.Body

mecerrato

Board Regular
Joined
Oct 5, 2015
Messages
184
Office Version
  1. 365
Platform
  1. Windows
I am using this piece of code in a macro that creates an appointment.
Is there a way to add a carriage return in this code, I cannot figure out the syntax for a new line (carriage return). I would like to place it after the first range value.

VBA Code:
OLAppointment.Body = Worksheets("Loans").Range("I" & ActiveCell.Row).Value & " County, HTH Loan Limit " & Worksheets("Loans").Range("R" & ActiveCell.Row).Value & " " & Worksheets("Loans").Range("K" & ActiveCell.Row).Value

any help would be greatly appreciated :)
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
I am using this piece of code in a macro that creates an appointment.
Is there a way to add a carriage return in this code, I cannot figure out the syntax for a new line (carriage return). I would like to place it after the first range value.

VBA Code:
OLAppointment.Body = Worksheets("Loans").Range("I" & ActiveCell.Row).Value & " County, HTH Loan Limit " & Worksheets("Loans").Range("R" & ActiveCell.Row).Value & " " & Worksheets("Loans").Range("K" & ActiveCell.Row).Value

any help would be greatly appreciated :)
Sorry, I was able to find something as simple as VbNewline and it worked perfectly.
 
Upvote 0
Solution

Forum statistics

Threads
1,224,828
Messages
6,181,209
Members
453,023
Latest member
alabaz

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top