I am trying to get my UI to open and send email with the text box data but every time i open the email it will only past the last textbox i need a simple fix?
Private Sub Submit_Click()
On Error GoTo ErrHandler
' SET Outlook APPLICATION OBJECT.
Dim objOutlook As Object
Set objOutlook = CreateObject("Outlook.Application")
' CREATE EMAIL OBJECT.
Dim objEmail As Object
Set objEmail = objOutlook.CreateItem(olMailItem)
With objEmail
.to = "t.m@medicar.com"
.Subject = "PTO Request"
.Body = TextBox1.Value
.Body = TextBox2.Value
.Body = TextBox4.Value
.Body = TextBox3.Value
.Display ' DISPLAY MESSAGE.
End With
' CLEAR.
Set objEmail = Nothing: Set objOutlook = Nothing
ErrHandler:
'
End Sub
Private Sub Submit_Click()
On Error GoTo ErrHandler
' SET Outlook APPLICATION OBJECT.
Dim objOutlook As Object
Set objOutlook = CreateObject("Outlook.Application")
' CREATE EMAIL OBJECT.
Dim objEmail As Object
Set objEmail = objOutlook.CreateItem(olMailItem)
With objEmail
.to = "t.m@medicar.com"
.Subject = "PTO Request"
.Body = TextBox1.Value
.Body = TextBox2.Value
.Body = TextBox4.Value
.Body = TextBox3.Value
.Display ' DISPLAY MESSAGE.
End With
' CLEAR.
Set objEmail = Nothing: Set objOutlook = Nothing
ErrHandler:
'
End Sub