Q:

submit button and email - excel

I have a button and macro currently set up that allows a sheet to save to a folder and close that sheet. Is there a way I can add to the macro so it will email out a message from Outlook saying something along the lines of "machine checklist submitted" to Test123@outlook.com for example. Below is the code i already have that works a treat.
Sub Saveworkbook()
Application.DisplayAlerts = False
Dim Sheet1 As Worksheet
Dim dName$, vName$, sName$
    dName = Range("B8")
    vName = ActiveWorkbook.FullName
    sName = ActiveWorkbook.ActiveSheet.Name
    For Each Sheet1 In ActiveWorkbook.Sheets
    If Not Sheet1.Name = sName Then
    Sheet1.Delete
    End If
    Next Sheet1

    ActiveWorkbook.SaveAs "\\filestore\IT$\Forms and Templates\Completed Checklists\" & dName & "_" & Environ("username") & "_" & Format(Now, "ddmmyy")
    ActiveWorkbook.Close
Application.DisplayAlerts = True
End Sub

Thanks in advance
Sam

A:

Add below to your code
dim olApp as object, olMail as object

set olApp = createobject("outlook.application")
set olMail = olApp.createitem(0) 

With olMail
    .To = "Test123@outlook.com"
    .Cc = ""
    .Bcc = ""
    .Subject = "machine checklist submitted"
    .body = "machine checklist submitted"
    .Send
End With
set olApp = nothing
set olMail = nothing

