Program a command button to e mail workbook

B

Bob C

The following code does not work it stops on the first line. I trying to
program a command button to e mail the file.

Private Sub CommandButton1_Click()
Sub Mail_workbook_1()
ActiveWorkbook.SendMail "[email protected]", _
"This is the Subject line"
End Sub

What is missing?
Thank you for your help.
Bob
 
Top