stirlingmw
Board Regular
- Joined
- Feb 18, 2013
- Messages
- 75
Morning all
Is there a way that when data is been added to a Userform Textbox and Return is pressed to start a new line that ";" is added to the end of the previous line?
The reason i am asking is the data being added are multiple email addresses and when these are added to the new email via the following code i would like the appropriate separator to be added.
Thanks
Steve
Is there a way that when data is been added to a Userform Textbox and Return is pressed to start a new line that ";" is added to the end of the previous line?
The reason i am asking is the data being added are multiple email addresses and when these are added to the new email via the following code i would like the appropriate separator to be added.
Code:
Private Sub EmailDESTeam_Click()
Dim xOutApp As Object
Dim xOutMail As Object
Dim xMailBody As String
On Error Resume Next
Set xOutApp = CreateObject("Outlook.Application")
Set xOutMail = xOutApp.CreateItem(0)
xMailBody = ""
On Error Resume Next
With xOutMail
.To = TxtDESTeam.value & TxtDESLead.value
.CC = TxtDESLead.value
.BCC = ""
.Subject = Format(Date, "yyyymmdd") & "-" & TxtProject.value & "-OS"
.Body = vbLf & _
"Please find the link below to the MCM CDT Project Tracker" & vbLf & vbLf & _
"You are being sent this email as you have been associated with the " & TxtProject.value & " Project." & vbLf & vbLf & " You are requested to nominate one of your team to update this project on a weekly basis." & vbLf & vbLf & _
"This nominated person is to annotate their email address into the 'Nominated DE&S Member' textbox. This person will receive weekly update reminders" & vbLf & vbLf & _
"xxxxxxxxxxxxxxxxx"
.Display
End With
On Error GoTo 0
Set xOutMail = Nothing
Set xOutApp = Nothing
End Sub
Thanks
Steve