I've adapted a downloaded userform from contextures.com that automatically populates to a database worksheet. I'm new to coding, but was able to adjust/adapt code to my needs (with a little help from this forum!) Everything is now working fine, BUT with initial testing feedback, I need to add code to automatically CLOSEthe form after the user hits the Submit button (which also auto-opens Save As PDF, then auto-attaches PDF to a notification email, then auto-saves the Excel file), so that other users can access the form.

My auto-save code is in ThisWorkbook:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
  'Save changes to workbook when closing, without prompting user.
  Me.Save
End Sub
Would I add to/change this code to achieve the auto-close function or would it be better to add it to the Submit button macro code? I've been searching the forums and tried a few things, but not getting the solution I need. Thanks in advance for any help/advice you can offer!