Visual basic code to send an e-mail

Joryd

New Member
Joined
Nov 12, 2002
Messages
2
A quick message from a newbie:

I have been trying to send an e-mail automatically when a button is selected in a userform. The user types in the e-mail address to send the e-mail to in a cell, say A2. The subject of the e-mail is typed in another cell, say cell A3 and the main message body in cell A4.

I will also need to e-mail an excel sheet from the current workbook as an attachment. If it is not possible to send just one sheet, I can record a macro myself to copy the sheet into a new workbook and then attach that.

I could really do with some visual basic code that will automatically do all this. I would really appreciate any help you could give!
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,215,139
Messages
6,123,262
Members
449,093
Latest member
Vincent Khandagale

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