How To Insert A Submit Form Button In Excel - Submit Form to Email – Create Fillable Forms in Excel

preview_player
Показать описание
HOW TO INSERT A SUBMIT FORM BUTTON IN EXCEL THAT SENDS COMPLETED FORM AS AN EMAIL ATTACHMENT // So you have created a fillable form and now you want to make it easy for your users to send their completed forms back to you. You can accomplish this by including a “Submit” button which is essentially a command button you can insert at the bottom of your form so when the user clicks it, it will automatically open their MS Outlook email client and have an e-mail with your return email address, subject and body text with the completed form attached, so that all they have to do is click “Send.”

Here is the VBA code used in this video to create the macro for the Submit command button (be sure to replace the Subject, Body Text and Email address with your own information):

Private Sub CommandButton1_Click()
Dim xOutlookObj As Object
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 = "Type the body or your email message here" & vbNewLine & vbNewLine & _
"Use this if you want a separate line of text" & vbNewLine & _
"Use this if you want another separate line of text"
On Error Resume Next
With xOutMail
.CC = ""
.BCC = ""
.Subject = "Enter the Email Subject Here"
.Body = xMailBody
.Attachments.Add ActiveWorkbook.FullName
.Display 'or use .Send
End With
On Error GoTo 0
Set xOutMail = Nothing
Set xOutApp = Nothing
End Sub
__________

__________
RESOURCES & GEAR
Some links included here are affiliate links. If you click on these links and make a purchase, I may earn a small commission at no additional cost to you. Thanks for supporting this channel!
__________
__________
FREE DOWNLOADS:
__________
CONNECT WITH ME:
__________
KEYWORDS: #MSExcel, microsoft excel tutorial, create fillable forms, fill-in forms, macros, Add a Submit Button to a Form, Create a Submit Form Button in Excel, How to Submit Excel Form to Email, Add a Command Button in Excel, Apply a button to send email with current excel form attached, excel productivity tools, Sharon Smith HR, @SharonSmithHR
__________
PLAYLISTS:

Рекомендации по теме
Комментарии
Автор

Great step by step instruction! Thank you!

maryrobinson
Автор

I used this recently but had already made a shape. Figured out I could still use a shape in place of the grey square command one so quite happy. Thank you.

daicaghund
Автор

Super helpful videos but one quick question that might be confusing. Is there a way to take the fillable form data auto-populate a larger excel spreadsheet. For example, I'd want to send out this form to a handful of people and want to have the responses organized into one large excel spreadsheet. So is there a way to have the forms auto-populate a larger data table without having to individually copy all of the information into my larger dataset? If this isn't feasible with this method is there a different way you suggest in making an excel spreadsheet that looks nice and is easily fillable by multiple people without them messing around with the sheet by creating new columns or changing the size of columns?

xanthesoter
Автор

27 seconds in, Thanks Sharon this is the first video I am watching, my goal is to have a submit button on sheet 1 that will post field results into new lines on sheet 2. For example an invoice that is filled out on sheet one then it is posted as a new line as an invoice record on sheet 2....Also sends to the printer. Will keep watching but not my intended result.

jaycal
Автор

Great video fairly easy to follow. I was wondering if you have video on how to make a form in excel with a submit button that when press send the data to another excel sheet that adds and logs the data when submit is press.

iscariotpaladin
Автор

WOW thank you so much made it look simple even when i did have the first clue.
would i be possible for the email text fields to be an input form individual cells in the spreadsheet?

Pontsticilljohnny
Автор

submit button form to prepopulate excel file data
7:15

Thank you for these videos. I'm trying to work out how I can collect the data from the submitted forms with the submit button into a spreadsheet. I have managed to do one line, but I cannot work out how to get the next line, it just writes over itself. I then want the next line and so on to prepopulate when lots of people will be using the form . I want the data to go to the next line after each submit button is selected. Does that make sense ? So when I select the Submit button, it overwrites the previous submission populated row in excel table instead of going to the next line automatically. Many thanks for your help - have been following for a while. You explain things beautifully.

SmileysSCHouse
Автор

Worked like a charm, thank you Sharon! 🤗

nthabisengsmarts
Автор

This is great! Thank-you. If I want to be the one who fills the form and sends it to the same recipient daily, (like an order form) can the “submit” button be made to disappear when the recipient opens it? Hopefully the question makes sense.

chrisstaniland
Автор

I really enjoyed your video. It's helping me to improve my Excel skills.

francesdobbins
Автор

Wow! I'm looking like an expert with your help! This was a fantastic video!

finoj
Автор

Thank you! have tried many codes to try and get what i want and this is exactly it!!

katarina.reynolds
Автор

Thanks for this video. Great help. One thing I noticed was the attachment seems to be named differently due to special characters. How can you delete that?

albyi
Автор

Thanks Sharon mam!! Once again great tutorial for me. Please keep it up your efforts for learner community.

manojraturi
Автор

Hi Sharon, thank you for sharing this helpful lesson. However, I run into an issue that the send button only attaches the original file to the email. it won't attach the file that I fill in with information without saving the file. Would you help me to fix it?

raymondthach
Автор

Nice video, easy to understand really helped me to automate mails from excel

varunrai
Автор

very good thank you but one question - will this only open Outlook as the mail client? what happens if the customer doesn't use Outlook as their mail client?

petesmit
Автор

Hello, thank you for this wonderfull tutorial, but what if I want to send every time the last record in a table? What is the code that I need to adopt? Thank you

dannybejjani
Автор

Where did you get the VBA code to copy into the sheet 1 ??

susankilpatrick
Автор

Is there a way to do this but have the table or in your case the form populate in the body of the email instead of a file attachment?

jesseorozco
welcome to shbcf.ru