VBA code for new line using OLAppointment.Body

mecerrato

Board Regular
Joined
Oct 5, 2015
Messages
174
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 did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
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,215,480
Messages
6,125,049
Members
449,206
Latest member
Healthydogs

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