How to Create a Fillable Form with a Submit Button in Excel

HomeOther ContentHow to Create a Fillable Form with a Submit Button in Excel
How to Create a Fillable Form with a Submit Button in Excel
How to Create a Fillable Form with a Submit Button in Excel
In this tutorial, you will learn how to create a fillable form with a submit button in Excel. This fillable form can be sent by email. The recipient then fills out the form, saves it and clicks the Submit button. VBA code running in the background opens Outlook, attaches the completed form to the email, and resends it to the specified email address. Once received, you can open it in MS Excel and see the answers to the questions.

Please keep in mind that this fillable form is only compatible with MS Outlook. This won't be the case with Gmail, Hotmail, Yahoo or any other service.

This process works best if the user saves the fillable form to their desktop or documents after completing it. They can then click the Submit button and the form will be returned to you.

Chapters:
00:00 – Introduction
00:53 – Example of completed form
01:18 – Form layout
01:40 – Form header and logo
02:42 – Add and format form fields
03:59 – Dropdown from form
05:48 – Database or table drop-down list
08:02 – Use VLOOKUP to autofill fields
09:38 – Fix #NA error in Excel
11:20 – Copy VLOOKUP to other fields to autofill
12:14 – Show special instructions based on cell value
14:47 – Insert checkboxes
4:06 p.m. – Formatting the form in Excel
6:14 p.m. – Hide table and database sheets
8:15 p.m. – Create and format the Submit button
22:44 – Add Visual Basic code
24h45 – Protect the form in Excel
26:27 – Test
28:42 – Conclusion

Here is the Visual Basic (VBA) code needed to create the Submit Form button to submit the form via email. You can also use this VBA code to send the completed form to multiple recipients. ***Be sure to update the subject, body, email to, email CC, email BCC, and additional text with your information.***

Private subcommand CommandButton1_Click()
Dim xOutlookObj as object
Dim xOutApp as object
Dim xOutMail as object
Dim xMailBody as string
If you make an error, then restart
Set xOutApp CreateObject(/"Outlook.Application/")
Define xOutMail xOutApp.CreateItem(0)
xMailBody /"Type the body or your email here/" & vbNewLine & vbNewLine & _
/"Use this if you want a separate line of text/" & vbNewLine & _
/"Use this if you want another separate line of text/"
If you make an error, then restart
With xOutMail
.To /"[protected email]/"
.CC /"/"
.BCC /"/"
.Subject /"Enter email subject here/"
.Body xMailBody
.Attachments.Add ActiveWorkbook.FullName
.Show' or use .Send
End with
In case of error, GoTo 0
Set xOutMail Nothing
Set xOutApp Nothing
End of the submarine

Support me with your Amazon purchases: https://melcompton.com/recommends/amazon-main-page/

Check out these programs I use for YouTube
Bluehost Discount: https://melcompton.com/recommends/blu…
Canva Pro trial: https://melcompton.com/recommends/can…
Adobe: https://melcompton.com/recommends/adobe/
Filmora: https://melcompton.com/recommends/won…

Follow me on social media:
Facebook: https://www.facebook.com/therealmelco…
Twitter: @melissaecompton
Instagram: @melissaacompton
LinkedIn: https://www.linkedin.com/in/melissa-c…

This description contains affiliate links and I may receive a small commission if you purchase using these links.

#melissacompton #excel #FillableForm

Please take the opportunity to connect and share this video with your friends and family if you find it useful.

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *