UserForm to send email

Antonio12

Board Regular
Joined
Jul 11, 2012
Messages
73
Hello All:

I'm hopping someone can help me with this so if you know, please do Help!!! I have office 2007 and run WinXP

I created a userform with 2 text boxes, 2 Checkboxes, a send button and a cancel button.

I need a code will allow the user to click send, and it will send the information on the userform straight to my email.

If possible I would like to have the Subject of the email with the information that is in the checkbox
In the text of the email the information that is in the first textbox
And finally the information that is in the other textbox.

Is this possible? Can someone please help!

Thank you all
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Thank you for the information, but it did not help. what i have so far is this:

Private Sub Enviar_Click()


Dim OutApp As Object
Dim OutMail As Object


Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)


On Error Resume Next
With OutMail
.To = "antonio.rodrigues@gmail.com"
.CC = ""
.BCC = ""
.Subject = "SL Report"
' .Display 'Comment Out This Line
.Send 'or use .Display 'Uncomment This Line
.Body = "This message was sent via a button on the form..."
.Attachments.Add ActiveWorkbook.FullName
'You can add other files also like this
'.Attachments.Add ("C:\test.txt")
.Send 'or use .Display
End With
On Error GoTo 0


Set OutMail = Nothing
Set OutApp = Nothing


End Sub

Now what I need is the information in the userform to be sent along with the email. I have two textboxes and two checkboxs.
 
Upvote 0
Antonio,

Since your code above contains your email address, I went ahead and sent an example workbook to you via that address. Feel free to take a look and ask more questions if needed.
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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