Hello everybody,
Goal: I am currently trying to create a command button in Excel that, when one clicks on it, sends out an email to me with an order that one has entered into Excel. The following link here: Using Excel VBA to Send Emails with Attachments - wellsr.com has a nice VBA code that goes sends out the email automatically, but does not add the attachment from what I understood when I tried it.
Likewise, this link here has a nice VBA code that adds the attachment, but does not send out the email automatically (under the second title, named: "
Email Selected Worksheets As Outlook Attachment": The VBA Guide To Sending Excel Attachments Through Outlook — The Spreadsheet Guru
Is there an Excel genius here who can help me combine these codes so I can get a command button which, when clicked on, sends out an email automatically to my own email with the Excel sheet attached?
I know this is a lot to ask for, but I would REAAALLY appreciate this! I have been struggling for the past 10+ hours with this and cannot find a solution to this and whenever I try I get "compile error, user-defined type not defined" and more errors in my worksheet.
Thank you so much for your time!
Best regards,
David
Goal: I am currently trying to create a command button in Excel that, when one clicks on it, sends out an email to me with an order that one has entered into Excel. The following link here: Using Excel VBA to Send Emails with Attachments - wellsr.com has a nice VBA code that goes sends out the email automatically, but does not add the attachment from what I understood when I tried it.
Likewise, this link here has a nice VBA code that adds the attachment, but does not send out the email automatically (under the second title, named: "
Email Selected Worksheets As Outlook Attachment": The VBA Guide To Sending Excel Attachments Through Outlook — The Spreadsheet Guru
Is there an Excel genius here who can help me combine these codes so I can get a command button which, when clicked on, sends out an email automatically to my own email with the Excel sheet attached?
I know this is a lot to ask for, but I would REAAALLY appreciate this! I have been struggling for the past 10+ hours with this and cannot find a solution to this and whenever I try I get "compile error, user-defined type not defined" and more errors in my worksheet.
Thank you so much for your time!
Best regards,
David